main = getContents >>= mapM_ print . map (calc . words) . takeWhile (/="0 ? 0") . lines
calc [a,op,b] = let
	a' = read a
	b' = read b
	in case op of
		"+" -> a' + b'
		"-" -> a' - b'
		"*" -> a' * b'
		"/" -> a' `div` b'