import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc=new Scanner(System.in);
        int count=0;
        int n=sc.nextInt();
        int mini=200001;
        for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        }
        System.out.println(count);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc=new Scanner(System.in);
        int count=0;
        int n=sc.nextInt();
        int mini=200001;
        for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        }
        System.out.println(count);
    }
} Main public static void main(String[] args)throws Exception{
        Scanner sc=new Scanner(System.in);
        int count=0;
        int n=sc.nextInt();
        int mini=200001;
        for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        }
        System.out.println(count);
    } main {
        Scanner sc=new Scanner(System.in);
        int count=0;
        int n=sc.nextInt();
        int mini=200001;
        for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        }
        System.out.println(count);
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int count=0; count 0 int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int mini=200001; mini 200001 for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        } {
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        } int p=sc.nextInt(); p sc.nextInt() sc.nextInt sc if(mini>=p)count++; mini>=p mini p count++ count mini=(int)Math.min(p,mini) mini (int)Math.min(p,mini) Math.min Math p mini 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)throws Exception{
        Scanner sc=new Scanner(System.in);
        int count=0;
        int n=sc.nextInt();
        int mini=200001;
        for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        }
        System.out.println(count);
    }
} public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc=new Scanner(System.in);
        int count=0;
        int n=sc.nextInt();
        int mini=200001;
        for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        }
        System.out.println(count);
    }
} Main
import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc=new Scanner(System.in);
        int count=0;
        int n=sc.nextInt();
        int mini=200001;
        for(int i=0;i<n;i++){
            int p=sc.nextInt();
            if(mini>=p)count++;
            mini=(int)Math.min(p,mini);
        }
        System.out.println(count);
    }
}