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