import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int count = 0;
    sc.nextLine();
    String line = sc.nextLine();
    String[] array = line.split(" ");
    int pi;
    int min = a + 1;
    for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    }
    
    System.out.println(count);
  }
}
    
     import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int count = 0;
    sc.nextLine();
    String line = sc.nextLine();
    String[] array = line.split(" ");
    int pi;
    int min = a + 1;
    for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    }
    
    System.out.println(count);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int count = 0;
    sc.nextLine();
    String line = sc.nextLine();
    String[] array = line.split(" ");
    int pi;
    int min = a + 1;
    for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    }
    
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int count = 0;
    sc.nextLine();
    String line = sc.nextLine();
    String[] array = line.split(" ");
    int pi;
    int min = a + 1;
    for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    }
    
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int count = 0; count 0 sc.nextLine() sc.nextLine sc String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] array = line.split(" "); array line.split(" ") line.split line " " int pi; pi int min = a + 1; min a + 1 a 1 for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    } {
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    } pi = Integer.parseInt(array[i]) pi Integer.parseInt(array[i]) Integer.parseInt Integer array[i] array i if(min > pi) {
    	  count++;
    	  min = pi;
      } min > pi min pi {
    	  count++;
    	  min = pi;
      } count++ count min = pi min pi 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 sc = new Scanner(System.in);
    int a = sc.nextInt();
    int count = 0;
    sc.nextLine();
    String line = sc.nextLine();
    String[] array = line.split(" ");
    int pi;
    int min = a + 1;
    for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    }
    
    System.out.println(count);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int count = 0;
    sc.nextLine();
    String line = sc.nextLine();
    String[] array = line.split(" ");
    int pi;
    int min = a + 1;
    for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    }
    
    System.out.println(count);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int count = 0;
    sc.nextLine();
    String line = sc.nextLine();
    String[] array = line.split(" ");
    int pi;
    int min = a + 1;
    for(int i = 0; i < a ; i++){
      pi = Integer.parseInt(array[i]);
      if(min > pi) {
    	  count++;
    	  min = pi;
      }
    }
    
    System.out.println(count);
  }
}
    
    