import java.util.*;
import java.util.stream.Collectors;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        List<Integer> values = new ArrayList<>();
        for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        }

        values = values.stream().distinct().collect(Collectors.toList());
        System.out.println(values.size());
    }
} import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        List<Integer> values = new ArrayList<>();
        for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        }

        values = values.stream().distinct().collect(Collectors.toList());
        System.out.println(values.size());
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        List<Integer> values = new ArrayList<>();
        for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        }

        values = values.stream().distinct().collect(Collectors.toList());
        System.out.println(values.size());
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        List<Integer> values = new ArrayList<>();
        for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        }

        values = values.stream().distinct().collect(Collectors.toList());
        System.out.println(values.size());
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner List<Integer> values = new ArrayList<>(); values new ArrayList<>() for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            values.add(scanner.nextInt());
        } {
            values.add(scanner.nextInt());
        } values.add(scanner.nextInt()) values.add values scanner.nextInt() scanner.nextInt scanner values = values.stream().distinct().collect(Collectors.toList()) values values.stream().distinct().collect(Collectors.toList()) values.stream().distinct().collect values.stream().distinct() values.stream().distinct values.stream() values.stream values Collectors.toList() Collectors.toList Collectors System.out.println(values.size()) System.out.println System.out System System.out values.size() values.size values String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        List<Integer> values = new ArrayList<>();
        for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        }

        values = values.stream().distinct().collect(Collectors.toList());
        System.out.println(values.size());
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        List<Integer> values = new ArrayList<>();
        for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        }

        values = values.stream().distinct().collect(Collectors.toList());
        System.out.println(values.size());
    }
} Main
import java.util.*;
import java.util.stream.Collectors;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        List<Integer> values = new ArrayList<>();
        for (int i=0; i<N; i++) {
            values.add(scanner.nextInt());
        }

        values = values.stream().distinct().collect(Collectors.toList());
        System.out.println(values.size());
    }
}