-- Computation - Simple Calculator

import Control.Applicative

main :: IO ()
main = do
  xs <- map (calc . words) . lines <$> getContents
  mapM_ putStrLn $ takeWhile (/= "end") xs


calc :: [String] -> String
calc [a, op, b]
  | op == "+" = show $ (read a) + (read b)
  | op == "-" = show $ (read a) - (read b)
  | op == "*" = show $ (read a) * (read b)
  | op == "/" = show $ div (read a) (read b)
  | op == "?" = "end"

