defmodule Main do def main, do: IO.read(:line) |> solve |> IO.puts() def solve(s) do {x, op_and_y} = s |> Integer.parse() {op, y_str} = op_and_y |> String.split_at(1) {y, _} = y_str |> Integer.parse() case op do "+" -> x - y "-" -> x + y end end end