main = mapM_ process . map (show. solve) .takeWhile (not. end) . map input. lines =<< getContents
  where process line = do putStrLn line

input :: String -> (Int, String, Int)
input line = (read a, op, read b)
  where (a:op:b:_)= words line

end :: (Int, String, Int)-> Bool
end (_,op,_)=op=="?"

solve :: (Int, String, Int)->Int
solve x
  | op == "+" = a + b
  | op == "-" = a - b
  | op == "*" = a * b
  | op == "/" = a `div` b
  | otherwise = 0
  where
    (a,op,b)=x