N = int(input()) A = [int(i) for i in input().split()] A_set = set(A) count = 0 for AS in A_set: if A.count(AS) == 1: count += 1 print(count)