import java.io.*;
import java.util.*;

class Main{
    public static void main(String args[])throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        // input
        int N = Integer.parseInt(br.readLine());
        String[] permutation = br.readLine().split(" ");

        // algorithm
        int min = 0;
        int result = 0;
        int tmp = 0;

        for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        }

        System.out.println(result);
      }
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main{
    public static void main(String args[])throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        // input
        int N = Integer.parseInt(br.readLine());
        String[] permutation = br.readLine().split(" ");

        // algorithm
        int min = 0;
        int result = 0;
        int tmp = 0;

        for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        }

        System.out.println(result);
      }
    }
} Main public static void main(String args[])throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        // input
        int N = Integer.parseInt(br.readLine());
        String[] permutation = br.readLine().split(" ");

        // algorithm
        int min = 0;
        int result = 0;
        int tmp = 0;

        for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        }

        System.out.println(result);
      }
    } main {
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        // input
        int N = Integer.parseInt(br.readLine());
        String[] permutation = br.readLine().split(" ");

        // algorithm
        int min = 0;
        int result = 0;
        int tmp = 0;

        for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        }

        System.out.println(result);
      }
    } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        // input
        int N = Integer.parseInt(br.readLine());
        String[] permutation = br.readLine().split(" ");

        // algorithm
        int min = 0;
        int result = 0;
        int tmp = 0;

        for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        }

        System.out.println(result);
      } {
        // input
        int N = Integer.parseInt(br.readLine());
        String[] permutation = br.readLine().split(" ");

        // algorithm
        int min = 0;
        int result = 0;
        int tmp = 0;

        for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        }

        System.out.println(result);
      } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) int N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] permutation = br.readLine().split(" "); permutation br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int min = 0; min 0 int result = 0; result 0 int tmp = 0; tmp 0 for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        } {
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        } tmp = Integer.parseInt(permutation[i]) tmp Integer.parseInt(permutation[i]) Integer.parseInt Integer permutation[i] permutation i if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          } i == 0 i 0 {
            min = tmp;
            result++;
          } min = tmp min tmp result++ result {
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          } if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            } min >= tmp min tmp {
              result++;
              min = tmp;
            } result++ result min = tmp min tmp {
              continue;  
            } continue; System.out.println(result) System.out.println System.out System System.out result String args[] args
import java.io.*;
import java.util.*;

class Main{
    public static void main(String args[])throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        // input
        int N = Integer.parseInt(br.readLine());
        String[] permutation = br.readLine().split(" ");

        // algorithm
        int min = 0;
        int result = 0;
        int tmp = 0;

        for(int i = 0; i < N; i++){
          tmp = Integer.parseInt(permutation[i]);
          
          if(i == 0){
            min = tmp;
            result++;
          }else{
            if(min >= tmp){
              result++;
              min = tmp;
            }else{
              continue;  
            }
          }

        }

        System.out.println(result);
      }
    }
}