#include <bits/stdc++.h>
const int N = 100005;
int a[N], ma[N], mi[N];
int main() {
  int n;
  scanf("%d", &n);
  int mx = 0, m = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] >= mx) {
      mx = a[i];
      m = i;
    }
    ma[i] = m;
  }
  int my = a[n], mv = n;
  for (int i = n; i >= 1; i--) {
    if (a[i] <= my) {
      my = a[i];
      mv = i;
    }
    mi[i] = mv;
  }
  int t = 1, ans = 1;
  while (t <= n) {
    if (t < n && a[mi[t + 1]] >= a[ma[t]]) {
      ans++;
    }
    t++;
  }
  printf("%d\n", ans);
}
