input() a = list(map(int, input().split())) print(sum([1 for i in set(a) if a.count(i) == 1]))