n,*a=$<.read.split.map &:to_i;r=1;(n-1).times{|i|d=a[i+1]-a[i];c=2;c+=1 while i+c-1