#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long x, y, z, w, i, j = 0;
  cin >> x;
  std::vector<long long> v(x);
  for (long long i = 0; i < (long long)(x); ++i) {
    cin >> v[i];
  }
  z = v[0];
  for (long long i = 0; i < (long long)(x); ++i) {
    if (v[i] >= z) {
      j++;
    } else {
      z = v[i];
    }
  }
  cout << j << endl;
  return 0;
}
