n = int(input()) seq = [int(i) for i in input().split()] count = 0 for i in seq: if seq.count(i) == 1: count += 1 print(count)