#include <bits/stdc++.h>
using namespace std;
int n, h[100005], Mi[100005];
int Ma[100005], ans = 0, pre = 0;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> h[i];
  for (int i = 1; i <= n; i++) Ma[i] = max(Ma[i - 1], h[i]);
  Mi[n + 1] = 1000000001;
  for (int i = n; i >= 1; i--) Mi[i] = min(Mi[i + 1], h[i]);
  for (int i = 1; i <= n; i++)
    if (Ma[i] <= Mi[i + 1]) ans++;
  cout << ans;
}
