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