import java.util.*;
 
public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), ans = 1;
        int a[];
        a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        int mmin = a[0];
        for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        }
        System.out.printf("%d\n", ans);
        in.close();
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), ans = 1;
        int a[];
        a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        int mmin = a[0];
        for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        }
        System.out.printf("%d\n", ans);
        in.close();
    }
} Main public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), ans = 1;
        int a[];
        a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        int mmin = a[0];
        for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        }
        System.out.printf("%d\n", ans);
        in.close();
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), ans = 1;
        int a[];
        a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        int mmin = a[0];
        for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        }
        System.out.printf("%d\n", ans);
        in.close();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt() n in.nextInt() in.nextInt in ans = 1; ans 1 int a[]; a a = new int[n] a new int[n] n for (int i = 0; i < n; i++)
            a[i] = in.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = in.nextInt(); a[i] = in.nextInt() a[i] a i in.nextInt() in.nextInt in int mmin = a[0]; mmin a[0] a 0 for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        } {
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        } if (a[i] < mmin) ans++; a[i] < mmin a[i] a i mmin ans++ ans mmin = Math.min(mmin, a[i]) mmin Math.min(mmin, a[i]) Math.min Math mmin a[i] a i System.out.printf("%d\n", ans) System.out.printf System.out System System.out "%d\n" ans in.close() in.close in String[] args args public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), ans = 1;
        int a[];
        a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        int mmin = a[0];
        for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        }
        System.out.printf("%d\n", ans);
        in.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), ans = 1;
        int a[];
        a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        int mmin = a[0];
        for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        }
        System.out.printf("%d\n", ans);
        in.close();
    }
} Main
import java.util.*;
 
public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), ans = 1;
        int a[];
        a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        int mmin = a[0];
        for (int i = 1; i < n; i++){
            if (a[i] < mmin) ans++;
            mmin = Math.min(mmin, a[i]);
        }
        System.out.printf("%d\n", ans);
        in.close();
    }
}
