input = gets.chomp count = 0 for i in 0..8 if input[i].to_i == 0 count += 10 else count += input[i].to_i end end puts count