import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] split = line.split(" ");
		List<Integer> intList = new ArrayList<Integer>();

		for(String s : split){
			intList.add(Integer.parseInt(s));
		}
		int cnt = 1;
		int min = intList.get(0);
		for(int i = 1; i < intList.size(); i++){
			int target = intList.get(i);
			if(target <= min){
				cnt++;
				min=target;
			}
		}
		int result = cnt;
		System.out.println(result);
	}

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz