import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Set set1 = new HashSet(); Set set2 = new HashSet(); int n = sc.nextInt(), tmp, cnt = 0; for(int i = 0; i < n; i++){ tmp = sc.nextInt(); if(!set1.contains(tmp)){ set1.add(tmp); } else { set2.add(tmp); } } System.out.println(set1.size()-set2.size()); } }