num = int(input()) seq = input().split() seq_uniq = list(set(seq)) count = 0 for i in seq_uniq: if seq.count(i) == 1: count += 1 print(count)