#include <bits/stdc++.h>
using namespace std;
int const N = 1e5 + 20, INF = 1e9 + 20;
int n, h[N], pmx[N], pmn[N], ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> h[i];
  for (int i = 0; i < n; i++) pmx[i] = i ? max(h[i], pmx[i - 1]) : h[i];
  pmn[n] = INF;
  for (int i = n - 1; ~i; i--) pmn[i] = min(h[i], pmn[i + 1]);
  for (int i = 0; i < n; i++) {
    if (pmx[i] <= pmn[i + 1]) ans++;
  }
  return cout << ans, 0;
}
