defmodule Main do def input, do: IO.read(:line) |> String.trim def ii, do: input() |> String.to_integer def li, do: input() |> String.split |> Enum.map(&String.to_integer/1) def yn(b), do: IO.puts(if b, do: "Yes", else: "No") import Bitwise def main do [f0, f1, n] = li() a = [f0, f1, bxor(f0, f1)] Enum.at(a, rem(n, 3)) |> IO.puts end end