import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

	Scanner sca = new Scanner(System.in);
	// 入力

	int n = sca.nextInt();
	int[] pi = new int[n];
	for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	}

	int ans = 0;
	int min = 300000;
	for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	}

	System.out.println(ans);

	// 後始末
	sca.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

	Scanner sca = new Scanner(System.in);
	// 入力

	int n = sca.nextInt();
	int[] pi = new int[n];
	for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	}

	int ans = 0;
	int min = 300000;
	for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	}

	System.out.println(ans);

	// 後始末
	sca.close();
	}
} Main public static void main(String[] args) {

	Scanner sca = new Scanner(System.in);
	// 入力

	int n = sca.nextInt();
	int[] pi = new int[n];
	for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	}

	int ans = 0;
	int min = 300000;
	for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	}

	System.out.println(ans);

	// 後始末
	sca.close();
	} main {

	Scanner sca = new Scanner(System.in);
	// 入力

	int n = sca.nextInt();
	int[] pi = new int[n];
	for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	}

	int ans = 0;
	int min = 300000;
	for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	}

	System.out.println(ans);

	// 後始末
	sca.close();
	} Scanner sca = new Scanner(System.in); sca new Scanner(System.in) int n = sca.nextInt(); n sca.nextInt() sca.nextInt sca int[] pi = new int[n]; pi new int[n] n for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
		pi[i] = sca.nextInt();
	} {
		pi[i] = sca.nextInt();
	} pi[i] = sca.nextInt() pi[i] pi i sca.nextInt() sca.nextInt sca int ans = 0; ans 0 int min = 300000; min 300000 for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	} {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	} if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		} min > pi[i] min pi[i] pi i {
			min = pi[i];
			ans++;
		} min = pi[i] min pi[i] pi i ans++ ans {

		} System.out.println(ans) System.out.println System.out System System.out ans sca.close() sca.close sca String[] args args public class Main {
	public static void main(String[] args) {

	Scanner sca = new Scanner(System.in);
	// 入力

	int n = sca.nextInt();
	int[] pi = new int[n];
	for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	}

	int ans = 0;
	int min = 300000;
	for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	}

	System.out.println(ans);

	// 後始末
	sca.close();
	}
} public class Main {
	public static void main(String[] args) {

	Scanner sca = new Scanner(System.in);
	// 入力

	int n = sca.nextInt();
	int[] pi = new int[n];
	for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	}

	int ans = 0;
	int min = 300000;
	for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	}

	System.out.println(ans);

	// 後始末
	sca.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

	Scanner sca = new Scanner(System.in);
	// 入力

	int n = sca.nextInt();
	int[] pi = new int[n];
	for(int i = 0; i < n; i++) {
		pi[i] = sca.nextInt();
	}

	int ans = 0;
	int min = 300000;
	for(int i = 0; i < n; i++) {
		if(min > pi[i]) {
			min = pi[i];
			ans++;
		}
		else {

		}
	}

	System.out.println(ans);

	// 後始末
	sca.close();
	}
}