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

public class Main
{
    private static int f(int[] xs, int pos, int max, int count) {
        if (pos >= xs.length) {
            return count;
        }

        if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        }
    }

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] xs = new int[n];
        for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }

//        System.out.println(f(xs, 0, Integer.MAX_VALUE, 0));
        Set<Integer> set = new HashSet<>();
        for (int i : xs) {
            set.add(i);
        }
        System.out.println(set.size());
   }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util import java.util.stream.Stream; Stream java.util.stream public class Main
{
    private static int f(int[] xs, int pos, int max, int count) {
        if (pos >= xs.length) {
            return count;
        }

        if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        }
    }

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] xs = new int[n];
        for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }

//        System.out.println(f(xs, 0, Integer.MAX_VALUE, 0));
        Set<Integer> set = new HashSet<>();
        for (int i : xs) {
            set.add(i);
        }
        System.out.println(set.size());
   }
} Main private static int f(int[] xs, int pos, int max, int count) {
        if (pos >= xs.length) {
            return count;
        }

        if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        }
    } f {
        if (pos >= xs.length) {
            return count;
        }

        if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        }
    } if (pos >= xs.length) {
            return count;
        } pos >= xs.length pos xs.length xs xs.length {
            return count;
        } return count; count if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        } xs[pos] < max xs[pos] xs pos max {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        } return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count)); Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count)) Math.max Math f(xs, pos + 1, xs[pos], count + 1) f xs pos + 1 pos 1 xs[pos] xs pos count + 1 count 1 f(xs, pos + 1, max, count) f xs pos + 1 pos 1 max count {
            return f(xs, pos + 1, max, count);
        } return f(xs, pos + 1, max, count); f(xs, pos + 1, max, count) f xs pos + 1 pos 1 max count int[] xs xs int pos pos int max max int count count public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] xs = new int[n];
        for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }

//        System.out.println(f(xs, 0, Integer.MAX_VALUE, 0));
        Set<Integer> set = new HashSet<>();
        for (int i : xs) {
            set.add(i);
        }
        System.out.println(set.size());
   } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] xs = new int[n];
        for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }

//        System.out.println(f(xs, 0, Integer.MAX_VALUE, 0));
        Set<Integer> set = new HashSet<>();
        for (int i : xs) {
            set.add(i);
        }
        System.out.println(set.size());
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] xs = new int[n]; xs new int[n] n for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            xs[i] = sc.nextInt();
        } {
            xs[i] = sc.nextInt();
        } xs[i] = sc.nextInt() xs[i] xs i sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i : xs) {
            set.add(i);
        } int i xs {
            set.add(i);
        } {
            set.add(i);
        } set.add(i) set.add set i System.out.println(set.size()) System.out.println System.out System System.out set.size() set.size set String[] args args public class Main
{
    private static int f(int[] xs, int pos, int max, int count) {
        if (pos >= xs.length) {
            return count;
        }

        if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        }
    }

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] xs = new int[n];
        for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }

//        System.out.println(f(xs, 0, Integer.MAX_VALUE, 0));
        Set<Integer> set = new HashSet<>();
        for (int i : xs) {
            set.add(i);
        }
        System.out.println(set.size());
   }
} public class Main
{
    private static int f(int[] xs, int pos, int max, int count) {
        if (pos >= xs.length) {
            return count;
        }

        if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        }
    }

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] xs = new int[n];
        for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }

//        System.out.println(f(xs, 0, Integer.MAX_VALUE, 0));
        Set<Integer> set = new HashSet<>();
        for (int i : xs) {
            set.add(i);
        }
        System.out.println(set.size());
   }
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.stream.Stream;

public class Main
{
    private static int f(int[] xs, int pos, int max, int count) {
        if (pos >= xs.length) {
            return count;
        }

        if (xs[pos] < max) {
            return Math.max(
                    f(xs, pos + 1, xs[pos], count + 1),
                    f(xs, pos + 1, max, count));
        }
        else {
            return f(xs, pos + 1, max, count);
        }
    }

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] xs = new int[n];
        for (int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }

//        System.out.println(f(xs, 0, Integer.MAX_VALUE, 0));
        Set<Integer> set = new HashSet<>();
        for (int i : xs) {
            set.add(i);
        }
        System.out.println(set.size());
   }
}
