#include <bits/stdc++.h>
int main() {
  int N;
  scanf("%d", &N);
  int H[N];
  int i;
  for (i = 0; i < N; i++) scanf("%d ", &H[i]);
  int ans = 1, boo = 1;
  i = 0;
  while (boo == 1 && i <= N - 2) {
    if (H[i] <= H[i + 1])
      ans += 1;
    else
      boo = 0;
    i += 1;
  }
  printf("%d", ans);
  return 0;
}
