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