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