#include <bits/stdc++.h>
using namespace std;
bool equalTo(double a, double b) {
  if (fabs(a - b) <= 1e-9) return true;
  return false;
}
bool notEqual(double a, double b) {
  if (fabs(a - b) > 1e-9) return true;
  return false;
}
bool lessThan(double a, double b) {
  if (a + 1e-9 < b) return true;
  return false;
}
bool lessThanEqual(double a, double b) {
  if (a < b + 1e-9) return true;
  return false;
}
bool greaterThan(double a, double b) {
  if (a > b + 1e-9) return true;
  return false;
}
bool greaterThanEqual(double a, double b) {
  if (a + 1e-9 > b) return true;
  return false;
}
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
int N;
int A[1000005];
int maxLeft[1000005];
int minRight[1000005];
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  maxLeft[0] = A[0];
  for (int i = 1; i < N; i++) {
    maxLeft[i] = max(maxLeft[i - 1], A[i]);
  }
  minRight[N - 1] = A[N - 1];
  for (int i = N - 2; i >= 0; i--) {
    minRight[i] = min(minRight[i + 1], A[i]);
  }
  int cnt = 1;
  for (int i = 0; i < N - 1; i++) {
    if (minRight[i + 1] >= maxLeft[i]) {
      cnt++;
    }
  }
  cout << cnt << endl;
}
