from collections import Counter n = int(input()) A = list(map(int, input().split())) C = Counter(A) ans = 0 for x,y in C.items(): if y == 1: ans += 1 print(ans)