#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
long suf[maxn];
long a[maxn];
int n;
long solve() {
  suf[n] = a[n];
  for (int i = n - 1; i > 0; i--) suf[i] = min(suf[i + 1], a[i]);
  int ans = 1;
  long mx = a[1];
  for (int i = 1; i < n; i++) {
    mx = max(mx, a[i]);
    if (mx <= suf[i + 1]) ans++;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%ld", a + i);
  int ans = solve();
  printf("%d\n", ans);
  return 0;
}
