N,*A=map(int,open(0).read().split()) x=1 for i in range(N): for j in range(i+1,N): if A[j]-A[j-1]-A[i+1]+A[i]:break else:x=max(x,j-i+1) print(x)