N = input() A = list(map(int, input().split())) new_num = 0 a_set = set(A) for a in a_set: if A.count(a) == 1: new_num += 1 print(new_num)