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