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