import Control.Monad
import Control.Applicative

solve :: [String] -> [String]
solve [] = []
solve (line:lines) =
    let [a,op,b] = words line in
    case (go (read a) op (read b)) of
    Just x -> show x : solve lines
    Nothing -> []
    where
    go :: Int -> String -> Int -> Maybe Int
    go a "+" b = Just $ a + b
    go a "-" b = Just $ a - b
    go a "*" b = Just $ a * b
    go a "/" b = Just $ a `div` b
    go _ _ _ = Nothing

main = 
    mapM_ putStrLn =<< solve . lines <$> getContents