

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Stack;




public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final long MAX = (long) 1e18;
    public static List<Integer>[] edges;
    public static int[][] parent;
    public static int col = 32;
    public static int[] Bit;
    public static long[] dp;
    public static long[] fac,inv;
	public static void main(String[] args) {
	
	FastReader sc = new FastReader();
	
	int n = sc.nextInt();
	int[] p = new int[n];
	int ans = 0;
	int min = n;
	for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	}
	out.print(ans);
	out.close();
}
} import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java import java.util.Stack; Stack java.util public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final long MAX = (long) 1e18;
    public static List<Integer>[] edges;
    public static int[][] parent;
    public static int col = 32;
    public static int[] Bit;
    public static long[] dp;
    public static long[] fac,inv;
	public static void main(String[] args) {
	
	FastReader sc = new FastReader();
	
	int n = sc.nextInt();
	int[] p = new int[n];
	int ans = 0;
	int min = n;
	for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	}
	out.print(ans);
	out.close();
}
} Main public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out)); out new PrintWriter (new BufferedOutputStream(System.out)) static int mod = (int) (1e9+7); mod (int) (1e9+7) 1e9 7 static long cf = 998244353; cf 998244353 static final long MAX = (long) 1e18; MAX (long) 1e18 public static List<Integer>[] edges; edges public static int[][] parent; parent public static int col = 32; col 32 public static int[] Bit; Bit public static long[] dp; dp public static long[] fac fac inv; inv public static void main(String[] args) {
	
	FastReader sc = new FastReader();
	
	int n = sc.nextInt();
	int[] p = new int[n];
	int ans = 0;
	int min = n;
	for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	}
	out.print(ans);
	out.close();
} main {
	
	FastReader sc = new FastReader();
	
	int n = sc.nextInt();
	int[] p = new int[n];
	int ans = 0;
	int min = n;
	for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	}
	out.print(ans);
	out.close();
} FastReader sc = new FastReader(); sc new FastReader() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] p = new int[n]; p new int[n] n int ans = 0; ans 0 int min = n; min n for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	} int i=0; int i=0; i 0 i<n i n ++i ++i i {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	} {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	} p[i] = sc.nextInt() p[i] p i sc.nextInt() sc.nextInt sc min = Math.min(min,p[i]) min Math.min(min,p[i]) Math.min Math min p[i] p i if(p[i] <= min) ++ans; p[i] <= min p[i] p i min ++ans ans out.print(ans) out.print out ans out.close() out.close out String[] args args public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	} FastReader BufferedReader br; br StringTokenizer root; root public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		} FastReader {
			br = new BufferedReader(new InputStreamReader(System.in));
		} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		} next {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		} while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			} root == null || !root.hasMoreTokens() root == null root null !root.hasMoreTokens() root.hasMoreTokens() root.hasMoreTokens root {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			} try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				} catch (Exception r) {
					r.printStackTrace();
				} Exception r {
					r.printStackTrace();
				} r.printStackTrace() r.printStackTrace r {
					root = new StringTokenizer(br.readLine());
				} root = new StringTokenizer(br.readLine()) root new StringTokenizer(br.readLine()) return root.nextToken(); root.nextToken() root.nextToken root int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next double nextDouble() {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		} nextLine {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		} String str = ""; str "" try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			} catch (Exception r) {
				r.printStackTrace();
			} Exception r {
				r.printStackTrace();
			} r.printStackTrace() r.printStackTrace r {
				str = br.readLine();
			} str = br.readLine() str br.readLine() br.readLine br return str; str public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final long MAX = (long) 1e18;
    public static List<Integer>[] edges;
    public static int[][] parent;
    public static int col = 32;
    public static int[] Bit;
    public static long[] dp;
    public static long[] fac,inv;
	public static void main(String[] args) {
	
	FastReader sc = new FastReader();
	
	int n = sc.nextInt();
	int[] p = new int[n];
	int ans = 0;
	int min = n;
	for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	}
	out.print(ans);
	out.close();
}
} public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final long MAX = (long) 1e18;
    public static List<Integer>[] edges;
    public static int[][] parent;
    public static int col = 32;
    public static int[] Bit;
    public static long[] dp;
    public static long[] fac,inv;
	public static void main(String[] args) {
	
	FastReader sc = new FastReader();
	
	int n = sc.nextInt();
	int[] p = new int[n];
	int ans = 0;
	int min = n;
	for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	}
	out.print(ans);
	out.close();
}
} Main


import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Stack;




public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final long MAX = (long) 1e18;
    public static List<Integer>[] edges;
    public static int[][] parent;
    public static int col = 32;
    public static int[] Bit;
    public static long[] dp;
    public static long[] fac,inv;
	public static void main(String[] args) {
	
	FastReader sc = new FastReader();
	
	int n = sc.nextInt();
	int[] p = new int[n];
	int ans = 0;
	int min = n;
	for(int i=0;i<n;++i) {
		p[i] = sc.nextInt();
		min = Math.min(min,p[i]);
		if(p[i] <= min) ++ans;
	}
	out.print(ans);
	out.close();
}
}