from collections import defaultdict N = input() A = map(int, raw_input().split()) deg = defaultdict(int) for i in A: deg[i] += 1 ans = 0 for i in deg: if (deg[i] == 1): ans += 1 print ans