import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) { HashSet nums = new HashSet<>(); HashSet doubles = new HashSet<>(); Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); for (int i = 0; i < N; i++) { int v = scanner.nextInt(); if (nums.contains(v)) { doubles.add(v); } nums.add(v); } System.out.println(nums.size() - doubles.size()); } }