public int singleNumber(int[] A) {
		if (A.length == 0)
			return 0;
		int times = 0;
		int pre = 0;
		for (int i = 0; i < A.length;) {
			pre = A[i];
			while (i < A.length && pre == A[i]) {
				times++;
				i++;
			}
			if (times != 3) {
				break;
			}
			times = 0;
		}
		int result = pre;

		return result;
	}