N = int(input()) A = lsit(map(int,input().split())) from collections import defaultdict d = defaultdict(int) for a in A: d[a] += 1 ans = 0 for v in d.values(): if v == 1:ans += 1 print(ans)