n,*a=$<.read.split;s=0;(a|[]).map{|i|c=a.count i;s+=c/2*4+c%2}/4;p s