N=int(input()) A=list(map(int, input().split())) a=1 for l in range(N-1): d=A[l+1]-A[l] for r in range(l+1, N): if A[r]-A[r-1]!=d: break if a