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

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		}
		int count = 0;
		int min = Collections.max(list);

		for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		}
		System.out.println(count);
		}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		}
		int count = 0;
		int min = Collections.max(list);

		for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		}
		System.out.println(count);
		}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		}
		int count = 0;
		int min = Collections.max(list);

		for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		}
		System.out.println(count);
		} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		}
		int count = 0;
		int min = Collections.max(list);

		for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		}
		System.out.println(count);
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			list.add(sc.nextInt());
		} {
			list.add(sc.nextInt());
		} list.add(sc.nextInt()) list.add list sc.nextInt() sc.nextInt sc int count = 0; count 0 int min = Collections.max(list); min Collections.max(list) Collections.max Collections list for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		} {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		} if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			} list.get(i) <= min list.get(i) list.get list i min {
				min = list.get(i);
				count++;
			} min = list.get(i) min list.get(i) list.get list i count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		}
		int count = 0;
		int min = Collections.max(list);

		for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		}
		System.out.println(count);
		}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		}
		int count = 0;
		int min = Collections.max(list);

		for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		}
		System.out.println(count);
		}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < N; i++) {
			list.add(sc.nextInt());
		}
		int count = 0;
		int min = Collections.max(list);

		for (int i = 0; i < N; i++) {
			if (list.get(i) <= min) {
				min = list.get(i);
				count++;
			}

		}
		System.out.println(count);
		}
}