defmodule Main do def main do IO.gets("") |> String.trim() |> solve |> IO.puts() end defp solve(s) do s |> String.to_charlist() |> Enum.map(fn x -> [x] |> to_string |> (&(case Integer.parse(&1) do {n, _} -> n _ -> 0 end)).() end) |> Enum.sum() end end