import java.io.*; import java.util.*; import java.math.*; class Main182 { public static void out (Object out) { System.out.println(out); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int ans = 0; int n = Integer.parseInt(br.readLine()); String[] line = br.readLine().split(" "); HashMap map = new HashMap(); for (int i = 0; i < n; i++) { if (map.containsKey(line[i])) { map.put(line[i], map.get(line[i]) + 1); } else { map.put(line[i], 1); } } for (String key : map.keySet()) { if (map.get(key) == 1) ans++; } out(ans); } }