import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<N;i++) {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		}
		System.out.println(set.size());
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<N;i++) {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		}
		System.out.println(set.size());
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<N;i++) {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		}
		System.out.println(set.size());
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<N;i++) {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		}
		System.out.println(set.size());
	} 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 HashSet<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for (int i=0;i<N;i++) {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		} {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		} int tmp=Integer.parseInt(sc.next()); tmp Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc set.add(tmp) set.add set tmp System.out.println(set.size()) System.out.println System.out System System.out set.size() set.size set String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<N;i++) {
			int tmp=Integer.parseInt(sc.next());
			set.add(tmp);
		}
		System.out.println(set.size());
	}
}