N = int(input()) A = list(map(int, input().split())) print(sum([1 for Ai in A if A.count(Ai) == 1]))