from collections import Counter N = int(input()) A = list(map(int, input().split())) num = Counter(A) #Aの中の要素の数を数える new = [i for i, v in num.items() if v == 1] print(len(new))