#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int &x : arr) cin >> x;
  vector<int> pre(n);
  vector<int> pos(n);
  pre[n - 1] = arr[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    pre[i] = min(arr[i], pre[i + 1]);
  }
  pos[0] = arr[0];
  for (int i = 1; i < n; i++) {
    pos[i] = max(arr[i], pos[i - 1]);
  }
  int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    if (pos[i] <= pre[i + 1]) {
      ans++;
    }
  }
  cout << ans + 1;
}
