import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int H = sc.nextInt();
		int ans = 1;
		
		for (int i=1; i<N; i++) {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int H = sc.nextInt();
		int ans = 1;
		
		for (int i=1; i<N; i++) {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int H = sc.nextInt();
		int ans = 1;
		
		for (int i=1; i<N; i++) {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int H = sc.nextInt();
		int ans = 1;
		
		for (int i=1; i<N; i++) {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int H = sc.nextInt(); H sc.nextInt() sc.nextInt sc int ans = 1; ans 1 for (int i=1; i<N; i++) {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		} int i=1; int i=1; i 1 i<N i N i++ i++ i {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		} {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if (H >= a) {
				ans++;
			} H >= a H a {
				ans++;
			} ans++ ans H = Math.min(a,H) H Math.min(a,H) Math.min Math a H System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int H = sc.nextInt();
		int ans = 1;
		
		for (int i=1; i<N; i++) {
			int a = sc.nextInt();
			if (H >= a) {
				ans++;
			}
			H = Math.min(a,H);
		}
		System.out.println(ans);
	}
}