import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> s = new HashSet<>();
        int d = 0;

        for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        }
        System.out.println(s.size());
        sc.close();
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> s = new HashSet<>();
        int d = 0;

        for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        }
        System.out.println(s.size());
        sc.close();
    }
} Main public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> s = new HashSet<>();
        int d = 0;

        for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        }
        System.out.println(s.size());
        sc.close();
    } main {
        final Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> s = new HashSet<>();
        int d = 0;

        for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        }
        System.out.println(s.size());
        sc.close();
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Set<Integer> s = new HashSet<>(); s new HashSet<>() int d = 0; d 0 for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        } {
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        } d = sc.nextInt() d sc.nextInt() sc.nextInt sc if(!s.contains(d)){
                s.add(d);
            } !s.contains(d) s.contains(d) s.contains s d {
                s.add(d);
            } s.add(d) s.add s d System.out.println(s.size()) System.out.println System.out System System.out s.size() s.size s sc.close() sc.close sc final String[] args args public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> s = new HashSet<>();
        int d = 0;

        for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        }
        System.out.println(s.size());
        sc.close();
    }
} public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> s = new HashSet<>();
        int d = 0;

        for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        }
        System.out.println(s.size());
        sc.close();
    }
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> s = new HashSet<>();
        int d = 0;

        for(int i=0; i<n; i++){
            d = sc.nextInt();
            if(!s.contains(d)){
                s.add(d);
            }
        }
        System.out.println(s.size());
        sc.close();
    }
}