import           Control.Applicative
import           Data.Maybe
import           Text.Printf

calc :: String -> Maybe Int
calc xs
    | op == "+" = Just $ read a + read b
    | op == "-" = Just $ read a - read b
    | op == "*" = Just $ read a * read b
    | op == "/" = Just $ read a `div` read b
    | otherwise = Nothing
  where
    [a, op, b] = words xs

main :: IO ()
main = do
    xs <- catMaybes . fmap calc . lines <$> getContents
    mapM_ print xs

