main :: IO ()
main = do ls <- getContents
          putStr (compose ls)

compose :: String -> String
compose = unlines . mathOp . fmap ((\[x,y,z] -> (read x::Int,y,read z::Int)) . take 3 . words) . lines

mathOp  :: [(Int, String, Int)] -> [String]
mathOp  [] = []
mathOp  ((m, op ,n):xs) | op == "?" = []
                        | otherwise = show (opr op m n) : mathOp xs

opr :: String -> Int -> Int -> Int
opr op | op == "+" = (+)
       | op == "-" = (-)
       | op == "*" = (*)
       | op == "/" = div
       | otherwise = error "Input is illegal."