import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        String[] l = reader.readLine().split(" ");
        int N = Integer.parseInt(l[0]);
        String[] list = reader.readLine().split(" ");
        int[] arr = new int[N];
        for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        }
        int[] dp = new int[N];
        dp[0] = 1;
        int min = arr[0];
        for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        }
        System.out.println(dp[dp.length-1]);
    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        String[] l = reader.readLine().split(" ");
        int N = Integer.parseInt(l[0]);
        String[] list = reader.readLine().split(" ");
        int[] arr = new int[N];
        for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        }
        int[] dp = new int[N];
        dp[0] = 1;
        int min = arr[0];
        for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        }
        System.out.println(dp[dp.length-1]);
    }

} Main public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        String[] l = reader.readLine().split(" ");
        int N = Integer.parseInt(l[0]);
        String[] list = reader.readLine().split(" ");
        int[] arr = new int[N];
        for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        }
        int[] dp = new int[N];
        dp[0] = 1;
        int min = arr[0];
        for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        }
        System.out.println(dp[dp.length-1]);
    } main {
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        String[] l = reader.readLine().split(" ");
        int N = Integer.parseInt(l[0]);
        String[] list = reader.readLine().split(" ");
        int[] arr = new int[N];
        for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        }
        int[] dp = new int[N];
        dp[0] = 1;
        int min = arr[0];
        for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        }
        System.out.println(dp[dp.length-1]);
    } BufferedReader reader = new BufferedReader((new InputStreamReader(System.in))); reader new BufferedReader((new InputStreamReader(System.in))) String[] l = reader.readLine().split(" "); l reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int N = Integer.parseInt(l[0]); N Integer.parseInt(l[0]) Integer.parseInt Integer l[0] l 0 String[] list = reader.readLine().split(" "); list reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int[] arr = new int[N]; arr new int[N] N for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        } int i= 0; int i= 0; i 0 i<N i N i++ i++ i {
            arr[i] =Integer.parseInt(list[i]);
        } {
            arr[i] =Integer.parseInt(list[i]);
        } arr[i] =Integer.parseInt(list[i]) arr[i] arr i Integer.parseInt(list[i]) Integer.parseInt Integer list[i] list i int[] dp = new int[N]; dp new int[N] N dp[0] = 1 dp[0] dp 0 1 int min = arr[0]; min arr[0] arr 0 for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        } int j = 1; int j = 1; j 1 j<N j N j++ j++ j {
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        } {
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        } if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            } arr[j]<min arr[j] arr j min {
                dp[j] = 1+dp[j-1];
                min = arr[j];
            } dp[j] = 1+dp[j-1] dp[j] dp j 1+dp[j-1] 1 dp[j-1] dp j-1 j 1 min = arr[j] min arr[j] arr j {
                dp[j] = dp[j-1];
            } dp[j] = dp[j-1] dp[j] dp j dp[j-1] dp j-1 j 1 System.out.println(dp[dp.length-1]) System.out.println System.out System System.out dp[dp.length-1] dp dp.length-1 dp.length dp dp.length 1 String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        String[] l = reader.readLine().split(" ");
        int N = Integer.parseInt(l[0]);
        String[] list = reader.readLine().split(" ");
        int[] arr = new int[N];
        for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        }
        int[] dp = new int[N];
        dp[0] = 1;
        int min = arr[0];
        for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        }
        System.out.println(dp[dp.length-1]);
    }

} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        String[] l = reader.readLine().split(" ");
        int N = Integer.parseInt(l[0]);
        String[] list = reader.readLine().split(" ");
        int[] arr = new int[N];
        for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        }
        int[] dp = new int[N];
        dp[0] = 1;
        int min = arr[0];
        for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        }
        System.out.println(dp[dp.length-1]);
    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        String[] l = reader.readLine().split(" ");
        int N = Integer.parseInt(l[0]);
        String[] list = reader.readLine().split(" ");
        int[] arr = new int[N];
        for(int i= 0;i<N;i++){
            arr[i] =Integer.parseInt(list[i]);
        }
        int[] dp = new int[N];
        dp[0] = 1;
        int min = arr[0];
        for(int j = 1;j<N;j++){
            if(arr[j]<min){
                dp[j] = 1+dp[j-1];
                min = arr[j];
            }
            else{
                dp[j] = dp[j-1];
            }
        }
        System.out.println(dp[dp.length-1]);
    }

}
