import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		}
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		}
		System.out.print(res);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		}
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		}
		System.out.print(res);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		}
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		}
		System.out.print(res);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		}
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		}
		System.out.print(res);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] input = new int[N]; input new int[N] N for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			input[i] = sc.nextInt();
		} {
			input[i] = sc.nextInt();
		} input[i] = sc.nextInt() input[i] input i sc.nextInt() sc.nextInt sc int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int res = 0; res 0 for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		} int i = 0; int i = 0; i 0 i < input.length i input.length input input.length i++ i++ i {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		} {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		} if (input[i] < min) {
				min = input[i];
				res++;
			} input[i] < min input[i] input i min {
				min = input[i];
				res++;
			} min = input[i] min input[i] input i res++ res System.out.print(res) System.out.print System.out System System.out res String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		}
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		}
		System.out.print(res);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		}
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		}
		System.out.print(res);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for (int i = 0; i < N; i++) {
			input[i] = sc.nextInt();
		}
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = 0; i < input.length; i++) {
			if (input[i] < min) {
				min = input[i];
				res++;
			}
		}
		System.out.print(res);
	}
}