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