#include <bits/stdc++.h>
using namespace std;
inline long double min(long double a, long double b) {
  if (a < b) return a;
  return b;
}
inline long double max(long double a, long double b) {
  if (a < b) return b;
  return a;
}
int n;
int a[100100];
int pref[100100];
int suff[100100];
int solve() {
  pref[0] = a[0];
  suff[n - 1] = a[n - 1];
  for (int(i) = (1); (i) < (n); ++(i)) pref[i] = max(pref[i - 1], a[i]);
  for (int i = n - 2; i >= 0; i--) suff[i] = min(suff[i + 1], a[i]);
  int count = 0;
  for (int(i) = (0); (i) < (n - 1); ++(i))
    if (pref[i] <= suff[i + 1]) count++;
  count++;
  return count;
}
int main() {
  cin >> n;
  for (int(i) = (0); (i) < (n); ++(i)) {
    scanf("%d", &a[i]);
  }
  cout << solve() << endl;
  return 0;
}
