use std::cmp::*; use std::io::*; fn main() { let mut s: String = String::new(); stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let s: Vec = itr.next().unwrap().chars().collect(); let mut ans = 0; for i in 1..s.len() { ans += if s[i] != '0' { 1 } else { 0 } } println!("{}", ans); }