module Main where

import Data.Functor
import Data.Maybe

main :: IO ()
main =  do
  { [x,o,y] <- getWords
  ; if (o == "?") then done
    else print (readOp o (read x) (read y)) >> main
  }

done :: IO ()
done = return ()

type Op = Int -> Int -> Int

ops :: [(String,Op)]
ops = [("+",(+)),("-",(-)),("*",(*)),("/",div)]

readOp :: String -> Op
readOp s = maybe undefined id (lookup s ops)

getWords :: IO [String]
getWords = words <$> getLine