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