#include <bits/stdc++.h>
using namespace std;
const int PRIME = 1000 * 1000 * 1000 + 7;
const int MULTIPLIER = 523;
const int INFI = (1 << 30) - 1;
const long double INF = 2 * 1e9 + 1;
const long double EPS = 1e-9;
const long double PI = 3.141592653589793238462643383279502884L;
const int DIM = 2;
const int MAX_N = 100 * 1000;
int h[MAX_N];
int minPref[MAX_N];
int maxPref[MAX_N];
int minSuf[MAX_N];
int maxSuf[MAX_N];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    cin >> h[i];
  }
  minPref[0] = h[0];
  maxPref[0] = h[0];
  for (int i = (1); i <= (n - 1); ++i) {
    minPref[i] = min(h[i], minPref[i - 1]);
    maxPref[i] = max(h[i], maxPref[i - 1]);
  }
  minSuf[n - 1] = h[n - 1];
  maxSuf[n - 1] = h[n - 1];
  for (int i = (n - 2); i >= (0); --i) {
    minSuf[i] = min(h[i], minSuf[i + 1]);
    maxSuf[i] = max(h[i], maxSuf[i + 1]);
  }
  int chunks = 1;
  for (int i = (n - 1); i >= (1); --i) {
    if (maxPref[i - 1] <= minSuf[i]) {
      ++chunks;
    }
  }
  cout << chunks;
  return 0;
}
