#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000000;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> pfxmx(n, -INF), sfxmn(n, INF);
  pfxmx[0] = a[0];
  sfxmn[n - 1] = a[n - 1];
  for (int i = 1; i < n; i++) {
    pfxmx[i] = max(a[i], pfxmx[i - 1]);
  }
  for (int i = n - 2; i >= 0; i--) {
    sfxmn[i] = min(a[i], sfxmn[i + 1]);
  }
  int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    ans += int(pfxmx[i] <= sfxmn[i + 1]);
  }
  cout << ans + 1;
  return 0;
}
