n=int(input()) a=list(map(int,input().split())) i=0 ans=0 a.sort() while i<=n-1: if a[i]==a[i+1]: ans+=1 i+=2 else: i+=1 print(ans)