n=int(input())
H=list(map(int,input().split()))
count=0
for i,h in enumerate(H):
    if i!=len(H)-1:
        if h<=H[i+1]:
            print(i)
            count+=1
    else:
        count+=1
print(count)