import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		}
	}
} Main public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		}
	} main {
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		}
	} try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		} {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] pArray = new int[n]; pArray new int[n] n for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
				pArray[i] = sc.nextInt();
			} {
				pArray[i] = sc.nextInt();
			} pArray[i] = sc.nextInt() pArray[i] pArray i sc.nextInt() sc.nextInt sc int min = pArray[0]; min pArray[0] pArray 0 int count = 1; count 1 for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			} int i = 1 ; int i = 1 ; i 1 i < n i n i++ i++ i {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			} {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			} if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				} pArray[i] < min pArray[i] pArray i min {
					//OK
					count++;
					min = pArray[i];
				} count++ count min = pArray[i] min pArray[i] pArray i System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		}
	}
} public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			int[] pArray = new int[n];
			
			for(int i = 0 ; i < n ; i++) {
				pArray[i] = sc.nextInt();
			}
			
			
			int min = pArray[0];
			int count = 1;
			for(int i = 1 ; i < n ; i++ ) {
				
				if ( pArray[i] < min) {
					//OK
					count++;
					min = pArray[i];
				}
			}

			System.out.println(count);
		}
	}
}