solve (a:op:b:_)
    | op == "+" = s1 + s2
    | op == "-" = s1 - s2
    | op == "*" = s1 * s2
    | op == "/" = s1 `div` s2
    where 
        s1 = read a
        s2 = read b

main = do
    s <- fmap (map words . lines) getContents
    mapM_ putStrLn . map show . map solve $ takeWhile (\(_:(op:_)) -> op /= "?") s

