from collections import Counter n = input() a = [int(i) for i in input().split()] print(sum([1 for i in Counter(a).values() if i < 2]))