import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    Set<Integer> m = new TreeSet<>();

    for (int i = 0; i < n; i++) {
      int a = sc.nextInt();
      m.add(a);
    }

    System.out.println(m.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();
    Set<Integer> m = new TreeSet<>();

    for (int i = 0; i < n; i++) {
      int a = sc.nextInt();
      m.add(a);
    }

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

    int n = sc.nextInt();
    Set<Integer> m = new TreeSet<>();

    for (int i = 0; i < n; i++) {
      int a = sc.nextInt();
      m.add(a);
    }

    System.out.println(m.size());
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    Set<Integer> m = new TreeSet<>();

    for (int i = 0; i < n; i++) {
      int a = sc.nextInt();
      m.add(a);
    }

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

    int n = sc.nextInt();
    Set<Integer> m = new TreeSet<>();

    for (int i = 0; i < n; i++) {
      int a = sc.nextInt();
      m.add(a);
    }

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

    int n = sc.nextInt();
    Set<Integer> m = new TreeSet<>();

    for (int i = 0; i < n; i++) {
      int a = sc.nextInt();
      m.add(a);
    }

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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    Set<Integer> m = new TreeSet<>();

    for (int i = 0; i < n; i++) {
      int a = sc.nextInt();
      m.add(a);
    }

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