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