import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int min = n + 1;
		int ans = 0;

		for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		}
		System.out.println(ans);

		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int min = n + 1;
		int ans = 0;

		for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		}
		System.out.println(ans);

		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int min = n + 1;
		int ans = 0;

		for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		}
		System.out.println(ans);

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int min = n + 1;
		int ans = 0;

		for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		}
		System.out.println(ans);

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int min = n + 1; min n + 1 n 1 int ans = 0; ans 0 for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		} {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		} int next = scan.nextInt(); next scan.nextInt() scan.nextInt scan if (min > next) {
				min = next;
				ans++;
			} min > next min next {
				min = next;
				ans++;
			} min = next min next ans++ ans System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int min = n + 1;
		int ans = 0;

		for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		}
		System.out.println(ans);

		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int min = n + 1;
		int ans = 0;

		for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		}
		System.out.println(ans);

		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int min = n + 1;
		int ans = 0;

		for (int i = 0; i < n; i++) {
			int next = scan.nextInt();
			if (min > next) {
				min = next;
				ans++;
			}
		}
		System.out.println(ans);

		scan.close();
	}
}
