n = int(input()) a = list(map(int, input().split())) cnt = 0 for k in set(a): if a.count(k)==1: cnt+=1 print(cnt)