module Main where

import Control.Applicative
import Control.Monad
import Data.List
import Text.Printf
import Numeric

main :: IO ()
main = do
  set<-map ((\[a,op,b]->(read a,op,read b)).words).init.lines<$>getContents
  mapM_ (print . solve) set

solve :: (Int,String,Int)->Int
solve (a,op,b)
  | op == "+" = a + b
  | op == "-" = a - b
  | op == "*" = a * b
  | op == "/" = a `div` b