defmodule Main do
  def main do
    n = IO.gets("") |> String.trim() |> String.to_integer()
    Enum.reduce([2,3], n, fn x, acc -> mathround(n, x) + acc end) |> IO.puts()
  end
  
  defp mathround(n, k) do
    :math.pow(n, k) |> round
  end
end