import sys from typing import Counter readline=sys.stdin.readline N=int(readline()) A=list(map(int,readline().split())) C=Counter(A) ans=0 for a,c in C.items(): if c==1: ans+=1 print(ans)