import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        
        int count = 0;
        int min = 99999999;
        while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        
        int count = 0;
        int min = 99999999;
        while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        
        int count = 0;
        int min = 99999999;
        while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        }
        System.out.println(count);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        
        int count = 0;
        int min = 99999999;
        while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] array = new int[n]; array new int[n] n int count = 0; count 0 int min = 99999999; min 99999999 while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        } n-- > 0 n-- n 0 {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if (num < min) {
                count++;
                min = num;
            } num < min num min {
                count++;
                min = num;
            } count++ count min = num min num 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 {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        
        int count = 0;
        int min = 99999999;
        while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        
        int count = 0;
        int min = 99999999;
        while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        }
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        
        int count = 0;
        int min = 99999999;
        while (n-- > 0) {
            int num = sc.nextInt();
            if (num < min) {
                count++;
                min = num;
            }
        }
        System.out.println(count);
    }
}
