#include <bits/stdc++.h>
using namespace std;

int main() {
  int n,min = 2*100000+1,ans = 0;
  cin >> n;
  for(int i = 0;i < n;i++){
    int p;
    cin >> p;
    if(p < min){
      min = p;
      ans++;
    }
  }
  cout << ans << endl;
}
