public int removeDuplicates2(int[] A) {
		if (A.length <= 1)
			return A.length;
		int index = 0, times = 1;
		for (int i = 1; i < A.length; i++) {
			if (A[index] == A[i]) {
				if (times == 2) {
					continue;
				}
				times++;
			} else {
				times = 1;
			}
			A[++index] = A[i];
		}
		return index + 1;
	}