#include<bits/stdc++.h>
using namespace std;
int main() {
  int n, p, pt, sum = 1;
  cin >> n;
  cin >> pt;
  for (int i = 1; i < n; i++) {
    cin >> p;
    if (pt > p) {
      sum += 1;
      pt = p;
    }
  }
  cout << sum ;
  return 0;
}