#include <bits/stdc++.h>
using namespace std;
int n;
int num[100010];
int l[100010];
int r[100010];
int ans = 0;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &num[i]);
  l[0] = num[0];
  r[n - 1] = 1000000001;
  for (int i = 1; i < n; i++) l[i] = max(num[i], l[i - 1]);
  for (int i = n - 2; i >= 0; i--) r[i] = min(num[i + 1], r[i + 1]);
  for (int i = 0; i < n; i++) {
    if (l[i] <= r[i]) ans++;
  }
  printf("%d", ans);
  return 0;
}
