long long paletta_sort(int N, int V[]) {
	for (int i = 0; i < N; ++i) {
		if ((V[i] & 1) != (i & 1))
			return -1;
	}
	return N;
}
