defmodule Main do def main do IO.read(:line) IO.read(:line) |> String.trim() |> String.split() |> Enum.map(&String.to_integer/1) |> solve() |> IO.puts() end def solve(p) do p |> Enum.map(&loli/1) |> Enum.sum() |> loli end def loli(n) do case n do 0 -> 0 _ -> n |> rem(9) end end end