n = int(input()) l = list(map(int, input().split())) c = 0 for i in set(l): if l.count(i)==1: c+=1 print(c)