N = int(input()) A = input().split() cnt = 0 for a in A: cnt += A.count(a) == 1 print(cnt)