import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
	static int n;
	static ArrayList<ArrayList<Integer>> edge;
	static boolean used[];

	static boolean flag = false;
	static int ans;

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		int a[] = new int[n];
		int min = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		}

		int ans = 0;

		for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		}

		System.out.println(ans);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util public class Main {
	static int n;
	static ArrayList<ArrayList<Integer>> edge;
	static boolean used[];

	static boolean flag = false;
	static int ans;

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		int a[] = new int[n];
		int min = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		}

		int ans = 0;

		for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		}

		System.out.println(ans);
	}
} Main static int n; n static ArrayList<ArrayList<Integer>> edge; edge static boolean used[]; used static boolean flag = false; flag false static int ans; ans public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		int a[] = new int[n];
		int min = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		}

		int ans = 0;

		for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		}

		System.out.println(ans);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		int a[] = new int[n];
		int min = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		}

		int ans = 0;

		for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		}

		System.out.println(ans);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) n = Integer.parseInt(br.readLine()) n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String str[] = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a[] = new int[n]; a new int[n] n int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = Integer.parseInt(str[i]);

		} {
			a[i] = Integer.parseInt(str[i]);

		} a[i] = Integer.parseInt(str[i]) a[i] a i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i int ans = 0; ans 0 for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		} {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		} min = Math.min(a[i], min) min Math.min(a[i], min) Math.min Math a[i] a i min if (min < a[i]) {

			} else {
				ans++;
			} min < a[i] min a[i] a i {

			} {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {
	static int n;
	static ArrayList<ArrayList<Integer>> edge;
	static boolean used[];

	static boolean flag = false;
	static int ans;

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		int a[] = new int[n];
		int min = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		}

		int ans = 0;

		for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		}

		System.out.println(ans);
	}
} public class Main {
	static int n;
	static ArrayList<ArrayList<Integer>> edge;
	static boolean used[];

	static boolean flag = false;
	static int ans;

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		int a[] = new int[n];
		int min = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		}

		int ans = 0;

		for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		}

		System.out.println(ans);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
	static int n;
	static ArrayList<ArrayList<Integer>> edge;
	static boolean used[];

	static boolean flag = false;
	static int ans;

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		int a[] = new int[n];
		int min = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(str[i]);

		}

		int ans = 0;

		for (int i = 0; i < n; i++) {
			min = Math.min(a[i], min);

			if (min < a[i]) {

			} else {
				ans++;
			}
		}

		System.out.println(ans);
	}
}