#include <bits/stdc++.h>
using namespace std;
int n;
int a[100011];
int vmax[100011], vmin[100011];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    vmax[i] = max(vmax[i - 1], a[i]);
  }
  vmin[n + 1] = 1000000000;
  for (int i = n; i >= 1; i--) vmin[i] = min(vmin[i + 1], a[i]);
  int ans = 0;
  for (int i = 1; i < n; i++) ans = ans + (vmax[i] <= vmin[i + 1]);
  printf("%d", ans + 1);
}
