#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6;
int a[maxn], b[maxn], h[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> h[i];
  a[0] = h[0], b[n - 1] = h[n - 1];
  for (int i = 1; i < n; i++) {
    if (h[i] > a[i - 1])
      a[i] = h[i];
    else
      a[i] = a[i - 1];
    if (h[n - i - 1] < b[n - i])
      b[n - i - 1] = h[n - i - 1];
    else
      b[n - i - 1] = b[n - i];
  }
  int count = 1;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] <= b[i + 1]) count += 1;
  }
  cout << count << endl;
  return 0;
}
