n,*a=map(int,open(0).read().split());r=1;i=0 while i