N = int(input()) lsa = [int(input()) for i in range(N)] K = lsa[0] rank = 1 print(1) for i in range(1,N): if K