from collections import Counter n=int(input()) A=list(map(int,input().split())) c=Counter(A) l2=list(set(l)) ans=0 for x in l2: if c[x]==1: ans+=1 print(ans)