import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // get value from StandardIn
    int n = Integer.parseInt(sc.next());
    int nextNum = 0;
    int minNum = Integer.parseInt(sc.next()); // 最小値格納
    int count = 1; // 最小値更新回数

    // 最小値以下を入力されたらインクリメント
    for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    }

    // int b = Integer.parseInt(sc.next());
    // String ans = "";

    System.out.println(count);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // get value from StandardIn
    int n = Integer.parseInt(sc.next());
    int nextNum = 0;
    int minNum = Integer.parseInt(sc.next()); // 最小値格納
    int count = 1; // 最小値更新回数

    // 最小値以下を入力されたらインクリメント
    for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    }

    // int b = Integer.parseInt(sc.next());
    // String ans = "";

    System.out.println(count);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // get value from StandardIn
    int n = Integer.parseInt(sc.next());
    int nextNum = 0;
    int minNum = Integer.parseInt(sc.next()); // 最小値格納
    int count = 1; // 最小値更新回数

    // 最小値以下を入力されたらインクリメント
    for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    }

    // int b = Integer.parseInt(sc.next());
    // String ans = "";

    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    // get value from StandardIn
    int n = Integer.parseInt(sc.next());
    int nextNum = 0;
    int minNum = Integer.parseInt(sc.next()); // 最小値格納
    int count = 1; // 最小値更新回数

    // 最小値以下を入力されたらインクリメント
    for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    }

    // int b = Integer.parseInt(sc.next());
    // String ans = "";

    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int nextNum = 0; nextNum 0 int minNum = Integer.parseInt(sc.next()); minNum Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int count = 1; count 1 for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    } {
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    } nextNum = Integer.parseInt(sc.next()) nextNum Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(nextNum < minNum){
        minNum = nextNum;
        count++;
      } nextNum < minNum nextNum minNum {
        minNum = nextNum;
        count++;
      } minNum = nextNum minNum nextNum 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 sc = new Scanner(System.in);
    // get value from StandardIn
    int n = Integer.parseInt(sc.next());
    int nextNum = 0;
    int minNum = Integer.parseInt(sc.next()); // 最小値格納
    int count = 1; // 最小値更新回数

    // 最小値以下を入力されたらインクリメント
    for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    }

    // int b = Integer.parseInt(sc.next());
    // String ans = "";

    System.out.println(count);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // get value from StandardIn
    int n = Integer.parseInt(sc.next());
    int nextNum = 0;
    int minNum = Integer.parseInt(sc.next()); // 最小値格納
    int count = 1; // 最小値更新回数

    // 最小値以下を入力されたらインクリメント
    for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    }

    // int b = Integer.parseInt(sc.next());
    // String ans = "";

    System.out.println(count);
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // get value from StandardIn
    int n = Integer.parseInt(sc.next());
    int nextNum = 0;
    int minNum = Integer.parseInt(sc.next()); // 最小値格納
    int count = 1; // 最小値更新回数

    // 最小値以下を入力されたらインクリメント
    for(int i=0; i<n-1; i++){
      // System.out.println(i);
      nextNum = Integer.parseInt(sc.next());
      if(nextNum < minNum){
        minNum = nextNum;
        count++;
      }
    }

    // int b = Integer.parseInt(sc.next());
    // String ans = "";

    System.out.println(count);
  }
}
