ll@N,@A[N];wt(max[L,1,N@OR[i,0,N-L](AND[j,i,i+L](A[j]+A[i+1]==A[i]+A[j+1]))$1](L+1));