from collections import Counter N = int(input()) A = list(map(int, input().split())) C = Counter(A) ans = sum(1 for c in C.values() if c == 1) print(ans)