N = int(input()) A = [int(input()) for _ in range(N)] A.sort(reverse=True) count = 1 gara = A[0] for i in range(1,N): if A[i] + 1 >= gara: count += 1 gara = A[i] print(count)