n,*A=map(int,open(0).read().split()) D=[1] for i in range(n-1): d=A[i+1]-A[i] D=D+[2] if n==d:D[-1]=D[-2]+1 n=d print(max(D))