class MillionDies attr_reader :n def initialize(n: 0) @n = n end def cause begin @n = Integer(gets.chomp) rescue end end def result puts (@n % 2 == 0)? (@n * 3.5).to_i : (@n * 3.5) end def run cause result end end if $0 == __FILE__ MillionDies.new.run end