n=int(input()) d={} for i in list(map(int,input().split())): if i in d: d[i]+=1 else: d[i]=1 print(len(list(filter(lambda x:d[x]==1,d.keys()))))