from collections import defaultdict _ = input() A = list(map(int, input().split())) counts = defaultdict() counts.default_factory = int for a in A: counts[a] += 1 print(len(list(filter(lambda x: x[1] == 1, counts.items()))))