import java.util.*; import java.io.InputStreamReader; import java.io.BufferedReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); String[] sa = br.readLine().split(" "); Map m = new HashMap<>(); for (int i = 0; i < N; i++) { int A = Integer.parseInt(sa[i]); m.merge(A, 1, Integer::sum); } long ans = m.values().stream().filter(e -> e == 1).count(); System.out.println(ans); } }