#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long int> vec(n + 1), cpy(n + 1), sum(n + 1);
  for (int i = 1; i <= n; i++) cin >> vec[i];
  cpy = vec;
  sort(vec.begin(), vec.end());
  for (int i = 1; i <= n; i++) sum[i] += sum[i - 1] + vec[i];
  long long int now = 0;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    now += cpy[i];
    if (now == sum[i]) ans++;
  }
  cout << ans << '\n';
  return 0;
}
