# B - Great Ocean View
# https://atcoder.jp/contests/abc124/tasks/abc124_b


n = int(input())
points = list(map(int, input().split()))


ans = 1

if len(points) == 1:
    pass 

elif len(points) == 2:
    if points[0] <= points[1]:
        ans += 1

elif len(points) <= 3:
    need_height = max(points[0], points[1])
    for i in range(1, len(points)):
        if need_height <= points[i] and points[i-1] <= points[i]:
            ans += 1
            

print(ans)





