let () = let s = read_line () in let len = String.length s in let rec f acc i = if i >= len then acc else let n = int_of_string @@ Char.escaped s.[i] in f (acc + n) (i + 1) in print_int @@ f 0 0