import java.util.*;

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

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Set<Integer> st = new TreeSet<>();
        for(int i = 0; i < n; ++i) {
            int x = s.nextInt();
            st.add(x);
        }
        System.out.println(st.size());
    }
}
