from collections import * from itertools import * from functools import * from heapq import * import sys, math input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) C = Counter(A) print(sum(v == 1 for v in C.values()))