N = int(input()) A = list(map(int, input().split())) d = {} for i in A: if not i in d: d[i] = 1 else: d[i] += 1 cnt = 0 for k, v in d.items(): if v == 1: cnt += 1 print(cnt)