n=int(input()) a=list(map(int,input().split())) gt=[] for i in range(n-1): if a[i]