import Data.Functor( (<$>))

main = do
    formulas <- (takeWhile (\[_,op_,_]->op_/="?")) . (words <$>) . lines <$> getContents
    let
	calc [a,"+",b] = read a+read b
	calc [a,"-",b] = read a-read b
	calc [a,"*",b] = read a*read b
	calc [a,"/",b] = read a`quot`read b

    (print . calc) `mapM_` formulas

