i=b=d=-.1;print(max(i:=d!=(d:=b-(b:=int(a)))or i+1for a in[*open(0)][1].split())+(b>-d))