import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];

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

    Set<Integer> lhs = new LinkedHashSet<Integer>();

    for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    }

    Object[] newa = lhs.toArray();

    System.out.println(newa.length);

  }
} import java.util.LinkedHashSet; LinkedHashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set 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];

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

    Set<Integer> lhs = new LinkedHashSet<Integer>();

    for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    }

    Object[] newa = lhs.toArray();

    System.out.println(newa.length);

  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];

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

    Set<Integer> lhs = new LinkedHashSet<Integer>();

    for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    }

    Object[] newa = lhs.toArray();

    System.out.println(newa.length);

  } main {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];

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

    Set<Integer> lhs = new LinkedHashSet<Integer>();

    for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    }

    Object[] newa = lhs.toArray();

    System.out.println(newa.length);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
      a[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      a[i] = sc.nextInt();
    } {
      a[i] = sc.nextInt();
    } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc Set<Integer> lhs = new LinkedHashSet<Integer>(); lhs new LinkedHashSet<Integer>() for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      lhs.add(a[i]);
    } {
      lhs.add(a[i]);
    } lhs.add(a[i]) lhs.add lhs a[i] a i Object[] newa = lhs.toArray(); newa lhs.toArray() lhs.toArray lhs System.out.println(newa.length) System.out.println System.out System System.out newa.length newa newa.length 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];

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

    Set<Integer> lhs = new LinkedHashSet<Integer>();

    for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    }

    Object[] newa = lhs.toArray();

    System.out.println(newa.length);

  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];

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

    Set<Integer> lhs = new LinkedHashSet<Integer>();

    for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    }

    Object[] newa = lhs.toArray();

    System.out.println(newa.length);

  }
} Main
import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];

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

    Set<Integer> lhs = new LinkedHashSet<Integer>();

    for (int i = 0; i < n; i++) {
      lhs.add(a[i]);
    }

    Object[] newa = lhs.toArray();

    System.out.println(newa.length);

  }
}