
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		String[] tmpArray = br.readLine().split(" ");
		int[] low = new int[n];
		int result = 1;
		
		low[0] = Integer.parseInt(tmpArray[0]);
		
		for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		}
		
		System.out.println(result);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		String[] tmpArray = br.readLine().split(" ");
		int[] low = new int[n];
		int result = 1;
		
		low[0] = Integer.parseInt(tmpArray[0]);
		
		for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		}
		
		System.out.println(result);
	}

} Main public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		String[] tmpArray = br.readLine().split(" ");
		int[] low = new int[n];
		int result = 1;
		
		low[0] = Integer.parseInt(tmpArray[0]);
		
		for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		}
		
		System.out.println(result);
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		String[] tmpArray = br.readLine().split(" ");
		int[] low = new int[n];
		int result = 1;
		
		low[0] = Integer.parseInt(tmpArray[0]);
		
		for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		}
		
		System.out.println(result);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] tmpArray = br.readLine().split(" "); tmpArray br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] low = new int[n]; low new int[n] n int result = 1; result 1 low[0] = Integer.parseInt(tmpArray[0]) low[0] low 0 Integer.parseInt(tmpArray[0]) Integer.parseInt Integer tmpArray[0] tmpArray 0 for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		} {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		} int tmp = Integer.parseInt(tmpArray[i]); tmp Integer.parseInt(tmpArray[i]) Integer.parseInt Integer tmpArray[i] tmpArray i if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			} tmp > low[i - 1] tmp low[i - 1] low i - 1 i 1 {
				low[i] = low[i - 1];
			} low[i] = low[i - 1] low[i] low i low[i - 1] low i - 1 i 1 {
				low[i] = tmp;
				result++;
			} low[i] = tmp low[i] low i tmp result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		String[] tmpArray = br.readLine().split(" ");
		int[] low = new int[n];
		int result = 1;
		
		low[0] = Integer.parseInt(tmpArray[0]);
		
		for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		}
		
		System.out.println(result);
	}

} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		String[] tmpArray = br.readLine().split(" ");
		int[] low = new int[n];
		int result = 1;
		
		low[0] = Integer.parseInt(tmpArray[0]);
		
		for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		}
		
		System.out.println(result);
	}

} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		String[] tmpArray = br.readLine().split(" ");
		int[] low = new int[n];
		int result = 1;
		
		low[0] = Integer.parseInt(tmpArray[0]);
		
		for(int i = 1; i < n; i++) {
			int tmp = Integer.parseInt(tmpArray[i]);
			
			if(tmp > low[i - 1]) {
				low[i] = low[i - 1];
			}
			else {
				low[i] = tmp;
				result++;
			}
		}
		
		System.out.println(result);
	}

}
