from collections import Counter N = int(input()) A = Counter([int(i) for i in input().split()]) ans = 0 for freq in A.values(): if freq == 1: ans += 1 print(ans)