#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
int h[N], s[N], n;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> h[i];
  s[n] = 1e9 + 7;
  for (int i = n - 1; i >= 0; --i) s[i] = min(s[i + 1], h[i]);
  int ret = 0, m = -1;
  for (int i = 0; i < n; ++i) {
    if (m <= s[i]) ++ret;
    m = max(m, h[i]);
  }
  cout << ret << endl;
}
