#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, maa = 0, mii = 1000000000;
  cin >> n;
  vector<int> v, a, b(n);
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    if (maa <= t) maa = t;
    a.push_back(maa);
    v.push_back(t);
  }
  for (int i = n - 1; i >= 0; i--) {
    if (mii >= v[i]) mii = v[i];
    b[i] = mii;
  }
  int ct = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] <= b[i + 1]) ct++;
  }
  cout << ct + 1;
  return 0;
}
