#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = (1ll << 60);
int main(void) {
  int n;
  ll ans = 0;
  int m = 0;
  cin >> n;
  vector<int> h(n);
  for (int i = 0; i < n; i++) {
    cin >> h[i];
    if (h[i] <= m) {
      ans++;
    }
    m = max(h[i], m);
  }
  cout << ans << endl;
}
