public static int singleNumber2(int[] A) {
		if (A.length == 0)
			return 0;
		int[] bits = new int[32];
		int result = 0;
		for (int i = 0; i < 32; i++) {
			for (int j = 0; j < A.length; j++) {
				if (((A[j] >> i) & 1) == 1) {
					bits[i] = (bits[i] + 1) % 3;
				}
			}
			result |= (bits[i] << i);
		}
		return result;
	}