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

ans = 0
if N > 1:
  if H[0] <= H[1]:
    ans += 1
  for i in range(2, N):
    if (H[i] >= H[i - 1]):
      ans += 1
    else:
      break
print(ans + 1)
