let rec f () =
  let (a, s, b) = Scanf.scanf "%d %c %d\n" (fun a b c -> a,b,c) in
  match s with
    '+' -> print_int @@ a + b; print_newline (); f ()
  | '-' -> print_int @@ a - b; print_newline (); f ()
  | '*' -> print_int @@ a * b; print_newline (); f ()
  | '/' -> print_int @@ a / b; print_newline (); f ()
  | _ -> ()

let () = f ()