use std::io::stdin; pub fn main() { let s = { let mut buf = String::new(); let _ = stdin().read_line(&mut buf); buf }; let sum: usize = s.chars().flat_map(|x| x.to_string().parse::()).sum(); println!("{}", sum); }