gets c = gets.split.map(&:to_i) s = c.sum / 10 p c.count{|a|a<=s}*30