#include <bits/stdc++.h>
using namespace std;
vector<int> vec1;
vector<int> vec2;
int n;
int main() {
  int i, j, h;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> h;
    vec1.push_back(h);
    vec2.push_back(h);
  }
  sort(vec2.begin(), vec2.end());
  int count = 0;
  int max = 1;
  int idx = -1;
  for (i = 0; i < n; i++) {
    if (vec1[i] >= max) {
      max = vec1[i];
      idx = lower_bound(vec2.begin() + idx + 1, vec2.end(), max) - vec2.begin();
    }
    if (i == idx) {
      count++;
    }
  }
  cout << count << endl;
  return 0;
}
