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