a=int(input()) b=[int(i) for i in input().split()] c=set(b) d=0 for i in c: if b.count(i)==1: d+=1 print(d)