defmodule Main do def main, do: IO.read(:line) |> String.trim() |> String.to_integer() |> solve |> IO.puts() def solve(n), do: solve_rec(n, {{1, 0}, {1, 1}}) def solve_rec(2, {_, {c, d}}), do: c + d def solve_rec(n, {{a, b}, {c, d}}), do: solve_rec(n - 1, {{c, d}, {c + d, a + b}}) end