main :: IO ()
main = interact $ unlines . map (show . calc . words) . takeWhile ('?' `notElem`) . lines

calc :: [String] -> Int
calc [x,op,y] = calc' (read x) op (read y)
    where calc' x "+" y = x + y
          calc' x "-" y = x - y
          calc' x "*" y = x * y
          calc' x "/" y = x `div` y
