N = int(input()) A = sorted([int(input()) for _ in range(N)]) if all(a+1 < b for a,b in zip(A, A[1:])): print(1) else: print(2)