#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (1ll * (a / gcd(a, b)) * b); }
long long phi(long long n) {
  long long result = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
long long binmul(long long a, long long b, long long c) {
  long long r = 0;
  a %= c;
  while (b > 0) {
    if (b & 1) r += a;
    a += a;
    r %= c;
    a %= c;
    b /= 2;
  }
  r = (r + c) % c;
  return r;
}
long long binpow(long long a, long long n, long long c) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = binmul(res, a, c);
    a = binmul(a, a, c);
    n /= 2;
  }
  res = (res + c) % c;
  return res;
}
void nxi(int& n) {
  bool min = 0;
  char c;
  n = 0;
  while ((c = getc(stdin)) && c <= 32)
    ;
  if (c == '-')
    min = 1;
  else
    n = c - 48;
  while ((c = getc(stdin)) && c > 32) n = (n << 3) + (n << 1) + c - 48;
  if (min) n = -n;
}
void prl(long long n) {
  if (n == 0) {
    puts("0");
    return;
  }
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  static int s[19];
  int top = 0;
  while (n > 0) s[top++] = n % 10, n /= 10;
  while (top--) putchar(s[top] + 48);
  puts("");
}
using namespace std;
const int nmax = 100010;
int n, a[nmax], l[nmax], r[nmax];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  l[1] = a[1], r[n] = a[n];
  for (int i = 2; i <= n; i++) l[i] = max(l[i - 1], a[i]);
  for (int i = n - 1; i >= 1; i--) r[i] = min(r[i + 1], a[i]);
  int ans = 0;
  for (int i = 1; i < n; i++)
    if (l[i] <= r[i + 1]) ans++;
  printf("%d\n", ans + 1);
  return 0;
}
