/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); // N(配列数) int n = sc.nextInt(); //System.out.println("n=" + n); List list = new ArrayList(); int index = 0; while((sc.hasNext()) && (index < n + 1)){ int s = sc.nextInt(); list.add(s); index++; } //HashSet hashSet = new HashSet(); //hashSet.addAll(list); // 重複しない配列 Set set = new HashSet(); for (Integer s : list) { if (!set.contains(s)) { set.add(s); } } // 新規カウント int c = 0 ; for (Integer x : set) { int cc = Collections.frequency(list, x); if (cc == 1) { c++; } } System.out.println(c); } }