#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, mi = (long long int)(1e16), ans;
  cin >> n;
  vector<long long int> a(n);
  ans = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0) mi = a[0];
    if (mi <= a[i]) ans++;
    mi = min(mi, a[i]);
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
