N=int(input()) A=list(map(int,input().split())) B=set(A) ans=0 for x in B: if A.count(x)==1:ans+=1 print(ans)