input() d = {} for a in map(int, input().split()): d[a] = d.get(a, 0) + 1 n = 0 for i in d.values(): if i == 1: n += 1 print(n)