s = gets.chomp sum = 0 for i in 0..s.to_s.length if s[i] == "0" sum += 10 end sum += s[i].to_i end puts sum