#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  vector<int> vec(a);
  int n = 0;
  int count = 0;
  for (int i = 0; i < a; i++) {
    cin >> vec.at(i);
    while (vec.at(i - n) <= vec.at(i)) {
      n++;
      if (i - n == -1) {
        count++;
        break;
      }
    }
  }
  cout << count << endl;
}
