import java.util.*;
// warm-up
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		Set<Integer> s = new HashSet<Integer>();
		int N = sc.nextInt();
		while (N-->0) s.add(sc.nextInt());
		System.out.println(s.size());
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} import java.util.*; util.* java public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		Set<Integer> s = new HashSet<Integer>();
		int N = sc.nextInt();
		while (N-->0) s.add(sc.nextInt());
		System.out.println(s.size());
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} Main static void solve() {
		Scanner sc = new Scanner(System.in);
		Set<Integer> s = new HashSet<Integer>();
		int N = sc.nextInt();
		while (N-->0) s.add(sc.nextInt());
		System.out.println(s.size());
		sc.close();		
	} solve {
		Scanner sc = new Scanner(System.in);
		Set<Integer> s = new HashSet<Integer>();
		int N = sc.nextInt();
		while (N-->0) s.add(sc.nextInt());
		System.out.println(s.size());
		sc.close();		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Set<Integer> s = new HashSet<Integer>(); s new HashSet<Integer>() int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc while (N-->0) s.add(sc.nextInt()); N-->0 N-- N 0 s.add(sc.nextInt()) s.add s sc.nextInt() sc.nextInt sc System.out.println(s.size()) System.out.println System.out System System.out s.size() s.size s sc.close() sc.close sc public static void main(String args[]) {
		solve();
	} main {
		solve();
	} solve() solve String args[] args public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		Set<Integer> s = new HashSet<Integer>();
		int N = sc.nextInt();
		while (N-->0) s.add(sc.nextInt());
		System.out.println(s.size());
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		Set<Integer> s = new HashSet<Integer>();
		int N = sc.nextInt();
		while (N-->0) s.add(sc.nextInt());
		System.out.println(s.size());
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} Main
import java.util.*;
// warm-up
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		Set<Integer> s = new HashSet<Integer>();
		int N = sc.nextInt();
		while (N-->0) s.add(sc.nextInt());
		System.out.println(s.size());
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

}