N=int(input()) A=list(map(int, input().split())) d=0 if N==1: print(1) exit() s=0 ansa,ansb=1,1 while s+1