import sys input=lambda: sys.stdin.readline().rstrip() n=int(input()) A=[int(i) for i in input().split()] import collections AA=collections.Counter(A) ans=0 for a in AA.keys(): if AA[a]==1: ans+=1 print(ans)