gets votes = gets.split.map(&:to_i) sum_votes = votes.inject(:+) puts votes.count { |vote| vote <= sum_votes / 10.0 } * 30