#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<long long int> d(n), v(n);
  for (long long int i = 0; i < n; i++) {
    cin >> d[i];
    v[i] = d[i];
  }
  long long int c = 0;
  for (long long int i = 1; i < n; i++) {
    d[i] = max(d[i - 1], v[i]);
    c++;
  }
  cout << c;
}
