import collections as c n,*s=map(int,open(0).read().split()) d=c.Counter(s) cnt=0 ans=0 for i in d.values(): ans+=i//2 cnt+=i%2 print(ans+cnt//4)