N = int(input())
ListH = list(map(int,input().split()))
result = 1
for i in range(N):
    for k in range(i):
        out = False
        if k >= 0:
            print(ListH[k],ListH[i])
            if ListH[k] < ListH[i]:
                out = True
    if not out :
        result += 1
print(result)