#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, m, count;
  count = 0;
  m = 0;
  cin >> N;
  vector<int> H;
  for (int i = 0; i < N; i++) {
    cin >> H.at(i);
    if (H.at(i) <= m) {
      count++;
      m = H.at(i);
    }
  }
  cout << count << endl;
}
