import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

//        int[] a = new int[N];
        SortedSet<Integer> a = new TreeSet<>();
        for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        }







        System.out.println(a.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();

//        int[] a = new int[N];
        SortedSet<Integer> a = new TreeSet<>();
        for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        }







        System.out.println(a.size());
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

//        int[] a = new int[N];
        SortedSet<Integer> a = new TreeSet<>();
        for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        }







        System.out.println(a.size());
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

//        int[] a = new int[N];
        SortedSet<Integer> a = new TreeSet<>();
        for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        }







        System.out.println(a.size());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc SortedSet<Integer> a = new TreeSet<>(); a new TreeSet<>() for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        } {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        } a.add(sc.nextInt()) a.add a sc.nextInt() sc.nextInt sc System.out.println(a.size()) System.out.println System.out System System.out a.size() a.size a String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

//        int[] a = new int[N];
        SortedSet<Integer> a = new TreeSet<>();
        for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        }







        System.out.println(a.size());
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

//        int[] a = new int[N];
        SortedSet<Integer> a = new TreeSet<>();
        for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        }







        System.out.println(a.size());
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

//        int[] a = new int[N];
        SortedSet<Integer> a = new TreeSet<>();
        for (int i = 0; i < N; i++) {
//            a[i] = sc.nextInt();
            a.add(sc.nextInt());
        }







        System.out.println(a.size());
    }
}
