#include <bits/stdc++.h>
using namespace std;
int a[100000], max1i[100000], minin[100000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0)
      max1i[i] = a[i];
    else
      max1i[i] = max(max1i[i - 1], a[i]);
  }
  minin[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    minin[i] = min(minin[i + 1], a[i]);
  }
  int sum = 0;
  for (int i = 0; i < n - 1; i++) {
    if (max1i[i] <= minin[i + 1]) sum++;
  }
  cout << sum + 1 << '\n';
  return 0;
}
