n = int(input()) A = list(map(int, input().split())) s = list(set(A)) cnt = 0 for i in s: a = A.count(i) if a == 1: cnt += 1 print(cnt)