input() A={} for x in map(int,input().split()): if x in A:A[x]+=1 else:A[x]=1 print(sum([A[k]==1 for k in A]))