#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], i;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    cout << 1;
    return 0;
  }
  int lmarr[n + 1], rmarr[n + 1];
  lmarr[0] = INT_MIN;
  rmarr[n] = INT_MAX;
  for (i = 0; i < n; i++) {
    lmarr[i + 1] = max(a[i], lmarr[i]);
  }
  for (i = n - 1; i >= 0; i--) {
    rmarr[i] = min(rmarr[i + 1], a[i]);
  }
  int count = 1;
  for (i = 1; i < n; i++) {
    if (lmarr[i] <= rmarr[i]) {
      count++;
    }
  }
  cout << count;
}
