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

res = 0
for indexa, valuea in enumerate(a):
  for indexb, valueb in enumerate(a):
    if indexa == indexb:
      res += 1
    if valuea < valueb:
      break
    if indexa > indexb :
      break

print(res)