import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		ArrayList<Integer> d = new ArrayList<Integer>();
		for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		}
		
		Collections.sort(d);
		Collections.reverse(d);
		
		int ans = 1;
		int base = d.get(0);
		
		for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		}
		
		System.out.println(ans);
	}

} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		ArrayList<Integer> d = new ArrayList<Integer>();
		for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		}
		
		Collections.sort(d);
		Collections.reverse(d);
		
		int ans = 1;
		int base = d.get(0);
		
		for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		}
		
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		ArrayList<Integer> d = new ArrayList<Integer>();
		for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		}
		
		Collections.sort(d);
		Collections.reverse(d);
		
		int ans = 1;
		int base = d.get(0);
		
		for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		}
		
		System.out.println(ans);
	} main {
		// TODO Auto-generated method stub
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		ArrayList<Integer> d = new ArrayList<Integer>();
		for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		}
		
		Collections.sort(d);
		Collections.reverse(d);
		
		int ans = 1;
		int base = d.get(0);
		
		for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		}
		
		System.out.println(ans);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn ArrayList<Integer> d = new ArrayList<Integer>(); d new ArrayList<Integer>() for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		} int i = 0; int i = 0; i 0 i < N i N i ++ i ++ i {
			d.add(stdIn.nextInt());
		} {
			d.add(stdIn.nextInt());
		} d.add(stdIn.nextInt()) d.add d stdIn.nextInt() stdIn.nextInt stdIn Collections.sort(d) Collections.sort Collections d Collections.reverse(d) Collections.reverse Collections d int ans = 1; ans 1 int base = d.get(0); base d.get(0) d.get d 0 for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		} int i = 1; int i = 1; i 1 i < d.size() i d.size() d.size d i ++ i ++ i {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		} {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		} if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			} d.get(i) < base d.get(i) d.get d i base {
				base = d.get(i);
				ans ++;
			} base = d.get(i) base d.get(i) d.get d i ans ++ ans if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			} d.get(i) == base d.get(i) d.get d i base {
				// Do nothing
			} {
				break;
			} break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		ArrayList<Integer> d = new ArrayList<Integer>();
		for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		}
		
		Collections.sort(d);
		Collections.reverse(d);
		
		int ans = 1;
		int base = d.get(0);
		
		for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		}
		
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		ArrayList<Integer> d = new ArrayList<Integer>();
		for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		}
		
		Collections.sort(d);
		Collections.reverse(d);
		
		int ans = 1;
		int base = d.get(0);
		
		for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		}
		
		System.out.println(ans);
	}

} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		ArrayList<Integer> d = new ArrayList<Integer>();
		for(int i = 0; i < N; i ++) {
			d.add(stdIn.nextInt());
		}
		
		Collections.sort(d);
		Collections.reverse(d);
		
		int ans = 1;
		int base = d.get(0);
		
		for(int i = 1; i < d.size(); i ++) {
			if(d.get(i) < base) {
				base = d.get(i);
				ans ++;
			}else if(d.get(i) == base){
				// Do nothing
			}else {
				break;
			}
		}
		
		System.out.println(ans);
	}

}