import java.util.*;
 
import java.io.*;
 
public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] P = new int[N];
        for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        }
        
        int min = N+1;
        int count = 0;
        for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        }
        System.out.println(count);
	}
}  import java.util.*; util.* java import java.io.*; io.* java public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] P = new int[N];
        for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        }
        
        int min = N+1;
        int count = 0;
        for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        }
        System.out.println(count);
	}
} Main public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] P = new int[N];
        for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        }
        
        int min = N+1;
        int count = 0;
        for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        }
        System.out.println(count);
	} main {
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] P = new int[N];
        for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        }
        
        int min = N+1;
        int count = 0;
        for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        }
        System.out.println(count);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s int[] P = new int[N]; P new int[N] N for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            P[i] = s.nextInt();
        } {
            P[i] = s.nextInt();
        } P[i] = s.nextInt() P[i] P i s.nextInt() s.nextInt s int min = N+1; min N+1 N 1 int count = 0; count 0 for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if(min > P[i]){
                min = P[i];
                count++;
            }
        } {
            if(min > P[i]){
                min = P[i];
                count++;
            }
        } if(min > P[i]){
                min = P[i];
                count++;
            } min > P[i] min P[i] P i {
                min = P[i];
                count++;
            } min = P[i] min P[i] P i count++ count System.out.println(count) System.out.println System.out System System.out count String[] $ $ public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] P = new int[N];
        for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        }
        
        int min = N+1;
        int count = 0;
        for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        }
        System.out.println(count);
	}
} public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] P = new int[N];
        for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        }
        
        int min = N+1;
        int count = 0;
        for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        }
        System.out.println(count);
	}
} Main
import java.util.*;
 
import java.io.*;
 
public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] P = new int[N];
        for(int i = 0; i < N; i++){
            P[i] = s.nextInt();
        }
        
        int min = N+1;
        int count = 0;
        for(int i = 0; i < N; i++){
            if(min > P[i]){
                min = P[i];
                count++;
            }
        }
        System.out.println(count);
	}
} 