#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  int cnt = 0, j = 0;
  bool swapped = false;
  for (int i = 1; i < n; i++) {
    int temp = a[i];
    for (j = i; j > 0 && temp < a[j - 1]; j--) {
      a[j] = a[j - 1];
    }
    a[j] = temp;
  }
  int s = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    s += b[i] - a[i];
    ans += !s;
  }
  cout << ans;
}
