n=input() l=map(int,raw_input().split()) l.sort() max=0; p1=0 p2=p1+1 while p2max: max=p2-p1 p1=p2 p2=p2+1 print max