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