N = int(input())
H = list(map(int, input().split()))
tmp = 0
cnt = 1
M = []
for i in range(N):
    M.append(H[i]-max(H))

for i in range(N-1):
    if M[i]==0:
        tmp += 1
    if tmp==0 and M[i+1]-M[i]>0:
        cnt += 1

print(cnt)