n = int(input()) A = list(map(int, input().split())) s = list(set(A)) dic = {x:0 for x in s} for a in A: if a in dic: dic[a] += 1 cnt = 0 for v in dic.values(): if v == 1: cnt += 1 print(cnt)