#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 10;
const int INF = (int)1e9;
const int mod = (int)1e9 + 7;
const long long LLINF = (long long)1e18;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  multiset<int> s;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    s.insert(a[i]);
  }
  s.insert((int)1e9);
  int ans = 0, left = 0;
  for (int i = 0; i < n; ++i) {
    s.erase(s.find(a[i]));
    if (a[i] >= left && *s.begin() >= left) {
      ++ans;
    }
    left = max(left, a[i]);
  }
  cout << ans;
  return 0;
}
