#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  int mx[100001], mn[100001], arr[100001];
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  mn[n] = 1e9 + 1;
  for (int i = n - 1; i >= 0; --i) mn[i] = min(arr[i], mn[i + 1]);
  mx[0] = arr[0];
  for (int i = 1; i <= n - 1; ++i) mx[i] = max(arr[i], mx[i - 1]);
  int res = 1;
  for (int i = 0; i < n - 1; i++)
    if (mx[i] <= mn[i + 1]) res++;
  cout << res;
}
