fn main() { let stdin = std::io::stdin(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let mut result: i32 = 0; for i in buf.as_str().chars() { result += match i { '0'..='9' => i as i32 - 48, _ => continue, } } println!("{}", result); }