import Control.Applicative
import Control.Monad
import Text.Printf

eval [a, b, c]
    | b == "+" = show $ numA + numC
    | b == "/" = show $ numA `div` numC
    | b == "-" = show $ numA - numC
    | b == "*" = show $ numA * numC
    | b == "?" = "" 
    | otherwise = ""
    where
        numA = read a
        numC = read c

main = do
    line <- (map (eval . words)) . takeWhile (notElem '?') . lines <$> getContents
    mapM_ putStrLn line 

