gets as = gets.chomp.split.map &:to_i p as.sum