s = gets.chomp.chars.map &:to_i score = 0 s.each {|c| if c == 0 score += 10 else score += c end } p score