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