from collections import Counter input() ans = 0 v = Counter(list(map(int, input().split()))).most_common() for i in range(len(v)): if v[i][1] == 1: ans += 1 print(ans)