public int checkBit(int[] A, int mark) {
		int count = 0;
		boolean finished = true;
		for(int i = 0; i < A.length; i++) {
			int temp = A[i] >> mark;
			if((temp & 1) == 1) count++;
			if(temp != 0) finished = false;
		}
		if(count % 3 == 1) return 1;
		else if(finished) return -1;
		else return 0;
	}