# Here your code ! from collections import defaultdict n = input() d = defaultdict(int) l = map(int,raw_input().split()) for t in l: d[t] +=1 c =0 for i in d: if d[i] == 1: c += 1 print c