N = int(input())
H = list(map(int, input().split()))

one = [0] * N
two = [0] * N

ans = 0

for i in range(N):
    if H[i] >= H[0]:
        one[i] = 1

for i in range(N):
    if H[i] >= H[i-1]:
        two[i] = 1

two[0] = 1
for i, j in zip(one, two):
    if i == 1 and j == 1:
        ans += 1
print(ans)
