import java.util.*;

class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;

        Integer n = sc.nextInt();
        TreeSet<Integer> s = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            s.add(sc.nextInt());
        }
        System.out.println(s.size());
        sc.close();
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;

        Integer n = sc.nextInt();
        TreeSet<Integer> s = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            s.add(sc.nextInt());
        }
        System.out.println(s.size());
        sc.close();
    }
} Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;

        Integer n = sc.nextInt();
        TreeSet<Integer> s = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            s.add(sc.nextInt());
        }
        System.out.println(s.size());
        sc.close();
    } main {

        Scanner sc = new Scanner(System.in);

        int ans = 0;

        Integer n = sc.nextInt();
        TreeSet<Integer> s = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            s.add(sc.nextInt());
        }
        System.out.println(s.size());
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans = 0; ans 0 Integer n = sc.nextInt(); n sc.nextInt() sc.nextInt sc TreeSet<Integer> s = new TreeSet<Integer>(); s new TreeSet<Integer>() for (int i = 0; i < n; i++) {
            s.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            s.add(sc.nextInt());
        } {
            s.add(sc.nextInt());
        } 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 String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;

        Integer n = sc.nextInt();
        TreeSet<Integer> s = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            s.add(sc.nextInt());
        }
        System.out.println(s.size());
        sc.close();
    }
}
