from collections import Counter N=int(input()) A=list(map(int,input().split())) C=Counter(A) ans=0 for a in C: if C[a]<2: ans+=1 print(ans)