#include <bits/stdc++.h>
using namespace std;
int max(int x, int y) {
  if (x > y)
    return x;
  else
    return y;
}
int min(int x, int y) {
  if (x < y)
    return x;
  else
    return y;
}
int a[111111], b[111111], c[111111];
int main() {
  int n, i;
  while (~scanf("%d", &n)) {
    for (i = 1; i <= n; i++) scanf("%d", &a[i]);
    b[1] = a[1];
    c[n] = a[n];
    for (i = 2; i <= n; i++) b[i] = max(b[i - 1], a[i]);
    for (i = n - 1; i > 0; i--) c[i] = min(c[i + 1], a[i]);
    int ans = 1;
    for (i = 1; i < n; i++)
      if (b[i] <= c[i + 1]) ans++;
    printf("%d\n", ans);
  }
  return 0;
}
