#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, min = 1000000000, max = -1000000000, ans = 1;
  cin >> n;
  int a[n], b[n], c[n];
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = n; i >= 1; i--) {
    if (min > a[i]) min = a[i];
    b[i] = min;
  }
  for (i = 1; i <= n; i++) {
    if (max < a[i]) max = a[i];
    c[i] = max;
  }
  for (i = 1; i < n; i++)
    if (b[i + 1] >= c[i]) {
      ans++;
      c[i] = 0;
    }
  cout << ans;
  return 0;
}
