defmodule Main do def main do IO.read(:line) |> String.split() |> (fn [s, t] -> [s, t |> String.to_integer()] end).() |> solve |> IO.puts() end defp solve([s, t]) do r() |> Enum.at( (t + (r() |> Enum.find_index(&(&1 == s)))) |> rem(12) ) end defp r do ~w(I II III IIII V VI VII VIII IX X XI XII) end end