N = int(input()) A = list(map(int, input().split())) dic = {} for i in range(N): dic[A[i]] = dic.get(A[i], 0) + 1 ans = 0 for v in dic.values(): if v == 1: ans += 1 print(ans)