#include <bits/stdc++.h>
using namespace std;
long long int premax[100005];
long long int suffmin[100005];
long long int h[100005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> h[i];
  }
  premax[0] = h[0];
  long long int maxval = h[0];
  for (int i = 1; i < n; i++) {
    maxval = max(maxval, h[i]);
    premax[i] = maxval;
  }
  suffmin[n - 1] = h[n - 1];
  long long int minval = h[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    minval = min(minval, h[i]);
    suffmin[i] = minval;
  }
  long long int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    if (premax[i] <= suffmin[i + 1]) ans += 1;
  }
  ans += 1;
  cout << ans << endl;
  return 0;
}
