use std::io; fn main() { let mut s = String::new(); io::stdin().read_line(&mut s).unwrap(); let sum: u32 = s.trim() .bytes() .filter(|&b| b >= b'0' && b <= b'9') .map(|b| (b - b'0') as u32) .sum(); println!("{}", sum); }