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

for i in range(N):
    if 0 < i:
        if H[0] <= H[i] and H[i-2] <= H[i] and H[i-1] < H[i]:
            n += 1
    elif i == 0:
        n += 1
print(n)