fn main() { let mut buf = String::new(); let mut input = { use std::io::Read; std::io::stdin().read_to_string(&mut buf).unwrap(); buf.split_whitespace() }; let s: String = input.next().unwrap().parse().unwrap(); let score = s.chars().fold(0, |acc, c| match c { '0' => acc + 10, _ => acc + String::from(c).parse::().unwrap(), }); println!("{}", score); }