N = int(input()) A = [int(i) for i in input().split()] M = 0 for i in range(N): if A.count(A[i]) == 1: M += 1 print(M)