import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
      int M[] = new int [N];
    int s =0;
    for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}}
    int x=0;
    int L=M[0];
    for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    }
    System.out.println( x );}
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
      int M[] = new int [N];
    int s =0;
    for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}}
    int x=0;
    int L=M[0];
    for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    }
    System.out.println( x );}
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
      int M[] = new int [N];
    int s =0;
    for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}}
    int x=0;
    int L=M[0];
    for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    }
    System.out.println( x );} main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
      int M[] = new int [N];
    int s =0;
    for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}}
    int x=0;
    int L=M[0];
    for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    }
    System.out.println( x );} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M[] = new int [N]; M new int [N] N int s =0; s 0 for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}} int i=0; int i=0; i 0 i<N i N i++ i++ i {
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}} {
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}} M[i]=sc.nextInt() M[i] M i sc.nextInt() sc.nextInt sc s = s+1 s s+1 s 1 if(M[i]==1){break;} M[i]==1 M[i] M i 1 {break;} break; int x=0; x 0 int L=M[0]; L M[0] M 0 for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    } int j=0; int j=0; j 0 j<s j s j++ j++ j {
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    } {
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    } L =Math.min(M[j],L) L Math.min(M[j],L) Math.min Math M[j] M j L if(L==M[j]){x=x+1;}else{x=x;} L==M[j] L M[j] M j {x=x+1;} x=x+1 x x+1 x 1 {x=x;} x=x x x System.out.println( x ) System.out.println System.out System System.out x String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
      int M[] = new int [N];
    int s =0;
    for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}}
    int x=0;
    int L=M[0];
    for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    }
    System.out.println( x );}
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
      int M[] = new int [N];
    int s =0;
    for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}}
    int x=0;
    int L=M[0];
    for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    }
    System.out.println( x );}
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
      int M[] = new int [N];
    int s =0;
    for(int i=0;i<N;i++){
      M[i]=sc.nextInt();
     s = s+1;
    if(M[i]==1){break;}}
    int x=0;
    int L=M[0];
    for(int j=0;j<s;j++){
      L =Math.min(M[j],L);
    if(L==M[j]){x=x+1;}else{x=x;}
    }
    System.out.println( x );}
}