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