import java.util.*;
public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        }
        System.out.println(map.size());
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        }
        System.out.println(map.size());
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        }
        System.out.println(map.size());
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        }
        System.out.println(map.size());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc HashMap<Integer, Integer> map = new HashMap<>(); map new HashMap<>() for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int d = sc.nextInt();
            map.put(d, i);
        } {
            int d = sc.nextInt();
            map.put(d, i);
        } int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc map.put(d, i) map.put map d i System.out.println(map.size()) System.out.println System.out System System.out map.size() map.size map String[] args args public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        }
        System.out.println(map.size());
    }
} public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        }
        System.out.println(map.size());
    }
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            int d = sc.nextInt();
            map.put(d, i);
        }
        System.out.println(map.size());
    }
}