calculation :: Int -> [Char] -> Int -> Int
calculation a op b
  | op == "+" = a + b
  | op == "-" = a - b
  | op == "*" = a * b
  | op == "/" = div a b

calculator :: IO ()
calculator  = do
  s' <- getLine
  let s = words s'
  let (a,op,b) = (read (s !! 0),(s !! 1),read (s !! 2))
  if op == "?" then return ()
  else do
    putStrLn $ show $ calculation a op b
    calculator
main = calculator