

import java.util.*;

class Main {
    public static void main(String args[]){

        Scanner s=new Scanner(System.in);
        Integer n= s.nextInt();
        long min=Long.MAX_VALUE;
        int count=0;
        for (int i = 1; i <=n ; i++) {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        }
        System.out.println(count);




    }
} import java.util.*; util.* java class Main {
    public static void main(String args[]){

        Scanner s=new Scanner(System.in);
        Integer n= s.nextInt();
        long min=Long.MAX_VALUE;
        int count=0;
        for (int i = 1; i <=n ; i++) {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        }
        System.out.println(count);




    }
} Main public static void main(String args[]){

        Scanner s=new Scanner(System.in);
        Integer n= s.nextInt();
        long min=Long.MAX_VALUE;
        int count=0;
        for (int i = 1; i <=n ; i++) {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        }
        System.out.println(count);




    } main {

        Scanner s=new Scanner(System.in);
        Integer n= s.nextInt();
        long min=Long.MAX_VALUE;
        int count=0;
        for (int i = 1; i <=n ; i++) {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        }
        System.out.println(count);




    } Scanner s=new Scanner(System.in); s new Scanner(System.in) Integer n= s.nextInt(); n s.nextInt() s.nextInt s long min=Long.MAX_VALUE; min Long.MAX_VALUE Long Long.MAX_VALUE int count=0; count 0 for (int i = 1; i <=n ; i++) {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        } int i = 1; int i = 1; i 1 i <=n i n i++ i++ i {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        } {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        } Integer p= s.nextInt(); p s.nextInt() s.nextInt s if(p<=min){
                count++;
            } p<=min p min {
                count++;
            } count++ count min=Math.min(p,min) min Math.min(p,min) Math.min Math p min System.out.println(count) System.out.println System.out System System.out count String args[] args


import java.util.*;

class Main {
    public static void main(String args[]){

        Scanner s=new Scanner(System.in);
        Integer n= s.nextInt();
        long min=Long.MAX_VALUE;
        int count=0;
        for (int i = 1; i <=n ; i++) {
            Integer p= s.nextInt();
            if(p<=min){
                count++;
            }
            min=Math.min(p,min);
        }
        System.out.println(count);




    }
}