use std::io::Read; fn main() { let mut buf = String::new(); std::io::stdin().read_to_string(&mut buf).unwrap(); let total: u32 = buf.chars() .filter_map(|c| c.to_digit(10)) .sum(); println!("{}", total); }