#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int a[MAXN], mina[MAXN], maxa[MAXN], x;
int main() {
  int n, ans = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  maxa[1] = a[1];
  mina[n] = a[n];
  for (int i = 2; i <= n; i++) maxa[i] = max(maxa[i - 1], a[i]);
  for (int i = n - 1; i; i--) mina[i] = min(mina[i + 1], a[i]);
  for (int i = 1; i <= n; i++)
    if (maxa[i] <= mina[i + 1]) ans++;
  printf("%d\n", ans + 1);
  return 0;
}
