gets a = gets.split.map(&:to_i) b = a.max p a.count{|x| x == b}