n,*i=$<.map &:to_i
p i.reduce(0){|s,a|s+i.count(a)/2}+i.select{|a|i.count(a)&1>0}.size/4