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