input() As = input().split() d = {} for A in As: d[A] = 0 for A in As: d[A] += 1 c = 0 for v in d.values(): if v == 1: c += 1 print(c)