module MakePairs def solve(ct) ct.map{|x| x / 2}.sum end module_function :solve end n = gets.chomp.to_i ct = Array.new(n + 1, 0) gets.chomp.split(/\s+/).map(&:to_i).each do |i| ct[i] += 1 end puts MakePairs.solve(ct)