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