import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();    
        int[] P = new int[N];
        for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        }   
        stdIn.close();

        int count = 1;
        int min = P[0];
        for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        }
        System.out.println(count);

    }
} import java.util.*; util.* java public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();    
        int[] P = new int[N];
        for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        }   
        stdIn.close();

        int count = 1;
        int min = P[0];
        for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        }
        System.out.println(count);

    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();    
        int[] P = new int[N];
        for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        }   
        stdIn.close();

        int count = 1;
        int min = P[0];
        for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        }
        System.out.println(count);

    } main {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();    
        int[] P = new int[N];
        for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        }   
        stdIn.close();

        int count = 1;
        int min = P[0];
        for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        }
        System.out.println(count);

    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int[] P = new int[N]; P new int[N] N for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            P[i] = stdIn.nextInt();
        } {
            P[i] = stdIn.nextInt();
        } P[i] = stdIn.nextInt() P[i] P i stdIn.nextInt() stdIn.nextInt stdIn stdIn.close() stdIn.close stdIn int count = 1; count 1 int min = P[0]; min P[0] P 0 for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        } {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        } if (P[i] < min) {
                min = P[i];
                count++;
            } P[i] < min P[i] P i min {
                min = P[i];
                count++;
            } min = P[i] min P[i] P i count++ count 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) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();    
        int[] P = new int[N];
        for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        }   
        stdIn.close();

        int count = 1;
        int min = P[0];
        for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        }
        System.out.println(count);

    }
} public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();    
        int[] P = new int[N];
        for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        }   
        stdIn.close();

        int count = 1;
        int min = P[0];
        for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        }
        System.out.println(count);

    }
} Main
import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();    
        int[] P = new int[N];
        for (int i = 0; i < N; i++) {
            P[i] = stdIn.nextInt();
        }   
        stdIn.close();

        int count = 1;
        int min = P[0];
        for (int i = 1; i < N; i++) {
            if (P[i] < min) {
                min = P[i];
                count++;
            }
        }
        System.out.println(count);

    }
}