main :: IO ()
main = interact (unlines . filter (/="") . map (myShow . calc) . takeWhile (\[_,op,_] -> op /= "?") . map words . lines)

calc :: [String] -> Maybe Int
calc [a, "+", b] = Just (read a + read b)
calc [a, "-", b] = Just (read a - read b)
calc [a, "*", b] = Just (read a * read b)
calc [a, "/", b] = Just (read a `div` read b)
calc _ = Nothing

myShow :: Maybe Int -> String
myShow Nothing = ""
myShow (Just d) = show d