function Main(input) {
  input.trim();
  input = input.split("\n");
  var N = input[0];
  var arr = input[1].split(" ").map(Number);
  var ans = 0;
  var low = 9999999999999999;
  for(var i=0;i<N;i++){
    if(low>=arr[i]){ans++;low = arr[i];}
  }
  console.log(ans);
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
function arr1dto2d (arr){
	for(var i=0;i<arr.length;i++){
    arr[i]=arr[i].split(" ").map(Number);
    }
  return arr;
}