let string_1_list_of_string x = String.to_seq x |> List.of_seq |> List.map (String.make 1);; let rec solve result one two = let h1 = List.hd one in let h2 = List.hd two in let result = if (h1 <> "0") && (h2 <> "0") then result + 1 else result in match (List.length two) with | 1 -> result | _ -> solve result (one @ [h2]) (List.tl two);; let () = let raw = read_line () |> string_1_list_of_string in let hd = [List.hd raw] in let tl = List.tl raw in solve 0 hd tl |> print_int; print_newline ();;