import Control.Applicative
main = do xs <- concatMap words . lines <$> getContents
          putStr . unlines . map show $ solve xs

solve :: [String] -> [Int]
solve (x:o:y:xs) | o == "?" = []
                 | o == "+" = ((read x) + (read y)) : solve xs
                 | o == "-" = ((read x) - (read y)) : solve xs
                 | o == "*" = ((read x) * (read y)) : solve xs
                 | o == "/" = ((read x) `div` (read y)) : solve xs