from collections import Counter input() counter=Counter(map(int, input().split())) ans = sum(v==1 for v in counter.values()) print(ans)