import java.util.*;
public class Main{
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        }
        int j,cnt=0;
        int min=999999999;
        for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        }
        System.out.println(cnt);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        }
        int j,cnt=0;
        int min=999999999;
        for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        }
        int j,cnt=0;
        int min=999999999;
        for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        }
        int j,cnt=0;
        int min=999999999;
        for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] p=new int[n]; p new int[n] n for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            p[i]=sc.nextInt();
        } {
            p[i]=sc.nextInt();
        } p[i]=sc.nextInt() p[i] p i sc.nextInt() sc.nextInt sc int j j cnt=0; cnt 0 int min=999999999; min 999999999 for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        } {
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        } min=Math.min(min,p[i]) min Math.min(min,p[i]) Math.min Math min p[i] p i if(min==p[i]) cnt++; min==p[i] min p[i] p i cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main{
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        }
        int j,cnt=0;
        int min=999999999;
        for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        }
        System.out.println(cnt);
    }
} public class Main{
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        }
        int j,cnt=0;
        int min=999999999;
        for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        }
        System.out.println(cnt);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++){
            p[i]=sc.nextInt();
        }
        int j,cnt=0;
        int min=999999999;
        for(int i=0;i<n;i++){
            min=Math.min(min,p[i]);
            if(min==p[i]) cnt++;
        }
        System.out.println(cnt);
    }
}