from collections import * N = int(input()) A = Counter(list(map(int, input().split()))) ans = 0 for k, v in A.items(): if v == 1: ans += 1 print(ans)