import numpy as np
N = int(input())
H = list(map(int, input().split()))
count = 0
H_max = np.amax(H)
H_max_index = np.argmax(H)

for i in range(len(H)):
    if H[i] == H_max:
        count += 1

for i in range(H_max_index):
    if H[i] <= H[i+1]:
        count += 1

print(count)