#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  int maxi[100100];
  int mini[100100];
  int a[100100];
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  maxi[0] = 0;
  mini[n + 1] = 1000000009;
  for (int i = 1; i <= n; i++) {
    maxi[i] = max(maxi[i - 1], a[i]);
  }
  for (int i = n; i >= 1; i--) {
    mini[i] = min(mini[i + 1], a[i]);
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (maxi[i] <= mini[i + 1]) ans++;
  }
  cout << ans << endl;
}
