#include <bits/stdc++.h>
using namespace std;
constexpr long long mod = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<long long> h(n);
  long long ma = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> h[i];
    if (ma >= h[i]) ans++;
    ma = max(ma, h[i]);
  }
  cout << ans;
}
