let split str delim =
  let rec doit s acc =
    match
      try Some (String.index s delim)
      with _ -> None
    with
    | None -> s :: acc
    | Some i ->
        let s1 = String.sub s 0 i in
        let s2 = String.sub s (i + 1) (String.length s - String.length s1 - 1) in
        doit s2 (s1 :: acc)
  in
  List.rev (doit str [])

let rec repl () =
  let l = read_line () in
  match split l ' ' with
  | [] | [_] | _::_::[] -> exit 1
  | a :: op :: b :: _ ->
      let a = int_of_string a in
      let b = int_of_string b in
      match op with
      | "?" -> ()
      | "+" -> Printf.printf "%d\n" (a + b); repl ()
      | "-" -> Printf.printf "%d\n" (a - b); repl ()
      | "*" -> Printf.printf "%d\n" (a * b); repl ()
      | "/" -> Printf.printf "%d\n" (a / b); repl ()
      | _ -> exit 1

let () =
  try repl () with End_of_file -> ()