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