public static int removeDuplicates(int[] A) {
		int index = 0;
		for (int i = 0; i < A.length; i++) {
			if (i + 1 < A.length && A[i] == A[i + 1]) {
				continue;
			}
			A[index++] = A[i];
		}
		return index;

	}