N=int(input()) A=list(map(int,input().split())) count=0 for i in range(len(A)): if A.count(A[i])==1: count+=1 print(count)