N=int(input()) A=[int(input()) for i in range(N)] A=sorted(A) d=0 for i in range(N-1): if A[i]+1