#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int H[N];
  for (int i = 0; i < N; i++) {
    int n;
    cin >> n;
    H[i] = n;
  }
  for (int i = 0; i < N; i++) {
    if (H[i] > H[i + 1]) {
      N--;
    }
  }
  cout << N << endl;
}
