n=int(input()) if n<2:print(1);exit() a=list(map(int,input().split())) s=[a[i+1]-a[i]for i in range(n-1)] i=l=y=0 while i