n=int(input()) a=[] rank=1 for _ in range(n): a.append(int(input())) print(1) for i in range(1,n): if a[0]