N = int(input()) A = list(map(int, input().split())) cnt = 0 L = list(set(A)) for i in L: x = A.count(i) if x == 1: cnt += 1 print(cnt)