defmodule Main do def main, do: IO.read(:line) |> String.trim() |> String.to_integer() |> solve |> IO.puts() def solve(n), do: solve_rec(n, {{0, 0}, {1, 0}}) def solve_rec(0, {_, {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