#include <bits/stdc++.h>
using namespace std;
int n = 0;
int arr[100009];
int Ma[100009];
int Mi[100009];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  Ma[n - 1] = arr[n - 1];
  Mi[0] = arr[0];
  for (int i = n - 2; i >= 0; i--) Ma[i] = min(Ma[i + 1], arr[i]);
  for (int i = 1; i < n; i++) Mi[i] = max(Mi[i - 1], arr[i]);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (Mi[i] <= Ma[i + 1]) ans++;
  }
  cout << ans + 1 << endl;
  return 0;
}
