sc :: [String] -> Int
sc (a:op:b:_)
  | op == "+" = ia + ib
  | op == "-" = ia - ib
  | op == "*" = ia * ib
  | op == "/" = div ia ib
  where
    ia = (read :: String -> Int) a
    ib = (read :: String -> Int) b

main = do
  aopb <- getLine
  if (words aopb) !! 1 == "?"
    then
      return []
    else do
      putStrLn $ show $ sc $ words aopb
      main