defmodule Main do def main do IO.read(:line) |> String.trim() |> solve() |> IO.puts() end def solve(n) do n |> String.replace("0", "") |> String.length() |> Kernel.-(1) end end