#include <bits/stdc++.h>
using namespace std;
long long n;
long long t;
vector<long long> h;
vector<long long> sh;
vector<long long> ord;
map<long long, long long> m;
long long ht[100005];
long long orght[100005];
void solve() {}
unsigned int mhash(unsigned int x) {
  x = ((x >> 16) ^ x) * 0x45d9f3b;
  x = ((x >> 16) ^ x) * 0x45d9f3b;
  x = ((x >> 16) ^ x);
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  long long x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    h.push_back(x);
    sh.push_back(x);
  }
  sort(sh.begin(), sh.end());
  long long val = sh[0];
  long long oo = 0;
  for (int i = 0; i < n; i++) {
    if (sh[i] == val) {
      ord.push_back(oo);
      m[val] = oo;
    } else {
      ord.push_back(i);
      oo = i;
      val = sh[i];
      m[val] = oo;
    }
    if (i == 0) {
      ht[i] = mhash(sh[i]);
      orght[i] = mhash(h[i]);
    } else {
      ht[i] = ht[i - 1] + mhash(sh[i]);
      orght[i] = orght[i - 1] + mhash(h[i]);
    }
  }
  long long res = 0;
  long long start = 0;
  long long maxord = 0;
  long long myhash = 0;
  for (int i = 0; i < n; i++) {
    myhash += mhash(h[i]);
    if (myhash == ht[i]) {
      res++;
    }
  }
  cout << res << endl;
  return 0;
}
