from collections import defaultdict cnt = defaultdict(int) N = int(input()) for n in input().split(' '): cnt[int(n)] += 1 ans = 0 for t in cnt.values(): if t == 1: ans += 1 print(ans)