n=int(input()) a=[int(input()) for _ in range(n)] a.sort() c=[0]*n for i in range(1,n): c[i]=0 if a[i-1]+1