gets a = $stdin.read.split.map(&:to_i) .group_by{|i| i} .map{|i,a| a.size.divmod(2)} .inject{|a1,a2| [a1[0]+a2[0], a1[1]+a2[1]]} puts a[0] + a[1] / 4