import collections N = int(input().strip()) A = [int(i) for i in input().strip().split()] lst = list(collections.Counter(A).items()) print(len([i for i in lst if i[1] == 1]))