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

count = 0
before = -1
for i in range(len(Hs)):
    if Hs[0] > Hs[i]:
        before = Hs[i]
        continue

    if before < Hs[i]:
        count += 1

    before = Hs[i]

print(count)