Problem:
Simple Calculator Write a program which reads two integers a , b and an operator op , and then prints the value of a  op  b . The operator op is '+', '-', '*' or '/' (sum, difference, product or quotient). The division should truncate any fractional part. Input The input consists of multiple datasets. Each dataset is given in the following format.  a  op  b  The input ends with a dataset where op = '?'. Your program should not process for this dataset. Output For each dataset, print the value in a line. Constraints  0 ≤ a , b ≤ 20000  No divisions by zero are given.  Sample Input 1 1 + 2
56 - 18
13 * 2
100 / 10
27 + 81
0 ? 0 Sample Output 1 3
38
26
10
108

Solution (Python):
while True:
    s = raw_input().split()
    a = int(s[0])
    b = int(s[2])
    if s[1] == "?":
        break
    elif s[1] == '+':
        print a + b
    elif s[1] == '-':
        print a - b
    elif s[1] == '*':
        print a * b
    elif s[1] == '/':
        print a / b

Solution (Python):
while True:
    a, op, b = raw_input().split()
    ai = int(a)
    bi = int(b)
    if op == '?':
        break
    elif op == '+':
        print(ai + bi)
    elif op == '-':
        print(ai - bi)
    elif op == '*':
        print(ai * bi)
    elif op == '/':
        print(ai / bi)

Solution (Python):
while True:
  a,op,b = raw_input().split()
  a,b = map(int,[a,b])

  if op == "?":
     break

  if op == "+":
     print (a+b)
  elif op == "-":
     print (a-b)
  elif op == "*":
     print (a*b)
  elif op == "/":
     print (a/b)

Solution (Python):

while True:
    entry = map(str, raw_input().split())
    a  = int(entry[0])
    op = entry[1]
    b  = int(entry[2])
    if op == "?":
        break
    elif op == "+":
        ans = a + b
    elif op == "-":
        ans = a - b
    elif op == "*":
        ans = a * b
    elif op == "/":
        ans = a / b
    print(ans)

Solution (Python):
while True:
    a, op, b = raw_input().split()
    if "?" == op:
        break
    a = int( a )
    b = int( b )
    if "+" == op:
        print a+b
    elif "-" == op:
        print a-b
    elif "*" == op:
        print a*b
    elif "/" == op:
        print a/b

Solution (Python):
while True:
    a, op, b = [x for x in input().split()]
    a, b = int(a), int(b)
    if op == "?":
        break
    elif op == "+":
        c = a + b
    elif op == "-":
        c = a - b
    elif op == "*":
        c = a * b
    else:
        c = a // b
    print(c)

Solution (Python):
while True:
    a, op, b = raw_input().split()
    ai = int(a)
    bi = int(b)
    if op == '?':
        break
    elif op == '+':
        print(ai + bi)
    elif op == '-':
        print(ai - bi)
    elif op == '*':
        print(ai * bi)
    elif op == '/':
        print(ai / bi)

Solution (Python):
while 1:
    a , op, b = raw_input().split()
    a = int(a)
    op = str(op)
    b = int(b)

    if op == '+':
         print a+b
    elif op == '-':
         print a-b
    elif op == '*':
        print a*b
    elif op == '/':
        print a/b
    elif op == '?':
        break

Solution (Python):
while True:
 a,op,b=raw_input().split()
 if op == "?":break
 if op == "+":print int(a) + int(b)
 if op == "-":print int(a) - int(b)
 if op == "*":print int(a) * int(b)
 if op == "/":print int(a) / int(b)

Solution (Python):
a = raw_input().split()
while a[1] != '?':
	print eval(a[0]+a[1]+a[2])
	a = raw_input().split()

Solution (Python):
while 1:

  str = raw_input().split()
  a = int(str[0])
  op = str[1]
  b = int(str[2])

  if op == '+':
    print a+b
  elif op == '-':
    print a-b
  elif op == '*':
    print a*b
  elif op == '/':
    print a/b
  elif op == '?':
    break

Solution (Python):
while True :
    a, op, b = map(str, raw_input().split(" "))
    a = int(a)
    b = int(b)
    if (op == "?") :
        break
    elif (op == "+") :
        print("%d" % (a+b))
    elif (op == "-") :
        print("%d" % (a-b))
    elif (op == "*") :
        print("%d" % (a*b))
    elif (op == "/") :
        print("%d" % (a/b))

Solution (Python):
while(True):
    (a,op,b) = [s for s in input().split()]
    a = int(a)
    b = int(b)
    if op == "+":
        print(a+b)
    elif op == "-":
        print(a-b)
    elif op == "/":
        print(a//b)
    elif op == "*":
        print(a*b)
    else:
        break

Solution (Python):
while True:
    a, op, b = raw_input().split()
    if op == "?":
        break
    else:
        if op == '+':
            print int(a) + int(b)
        elif op == '-':
            print int(a) - int(b)
        elif op == '*':
            print int(a) * int(b)
        elif op == '/':
            print int(a) / int(b)
        else:
            print "error"

Solution (Python):
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p == 0: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

Solution (Python):
while 1:
  input_a , op , input_b = map( str , raw_input().split() )
  a = int( input_a )
  b = int( input_b )
  if op == '+':
      print a + b
  elif op == '-':
      print a - b
  elif op == '*':
      print a * b
  elif op == '/':
      print a / b
  else:
      break

Solution (Python):
while 1:
 
  x = raw_input().split()
  a = int(x[0])
  op = x[1]
  b = int(x[2])
 
  if op == '+':
    print a+b
  elif op == '-':
    print a-b
  elif op == '*':
    print a*b
  elif op == '/':
    print a/b
  elif op == '?':
    break

Solution (Python):
while 1:
    a, op, b = map(str, raw_input().split())
    if op == "+":
        print int(a) + int(b)
    elif op == "-":
        print int(a) - int(b)
    elif op == "*":
        print int(a) * int(b)
    elif op == "/":
        print int(a) / int(b)
    elif op == "?":
        break

Solution (Python):
def add(x, y):
    return x+y

def diff(x, y):
    return x-y
    
def mul(x, y):
    return x*y
    
def div(x, y):
    return int(x/y)

op = {"+" : add , "-" : diff, "*" : mul, "/" : div}

st = input()
s = st.split()
while(not s[1] == '?'):
    print(op[s[1]](int(s[0]), int(s[2])))
    st = input()
    s = st.split()

Solution (Python):

while True :
    a,op,b = map(str,raw_input().split())
    
    a = int(a)
    b = int(b)
    
    if op == "+" :
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b
    elif op == "?":
        break

Solution (Python):
while True:
    l = input().split()
    a = int(l[0])
    b = int(l[2])
    op = l[1]
    if op == '?':
        break
    if op == '+':
        ans = a + b
        print(ans)
    elif op == '-':
        ans = a - b
        print(ans)
    elif op == '*':
        ans = a * b
        print(ans)
    elif op == '/':
        ans = a // b
        print(ans)

Solution (Python):
while True:
    l = input().split()
    a = int(l[0])
    b = int(l[2])
    op = l[1]
    if op == '?':
        break
    if op == '+':
        ans = a + b
        print(ans)
    elif op == '-':
        ans = a - b
        print(ans)
    elif op == '*':
        ans = a * b
        print(ans)
    elif op == '/':
        ans = int(a / b)
        print(ans)

Solution (Python):
while True:
	t = list(input().split())
	a = int(t[0])
	op = t[1]
	b = int(t[2])

	if (op == "?"):
		break
	elif (op == "+"):
		print(str(a + b))
	elif (op == "-"):
		print(str(a - b))
	elif (op == "*"):
		print(str(a * b))
	else :
		c = int(a/b)
		print(str(c))

Solution (Python):
while True :
    a, op, b = map(str, raw_input().split(" "))
    a = int(a)
    b = int(b)
    if (op == "?") :
        break
    elif (op == "+") :
        print("%d" % (a+b))
    elif (op == "-") :
        print("%d" % (a-b))
    elif (op == "*") :
        print("%d" % (a*b))
    elif (op == "/") :
        print("%d" % (a/b))

Solution (Python):
while 1:
	x = raw_input().split()
	a,op,b = int(x[0]),x[1],int(x[2])
	if op == "+":
		print a+b
	elif op == "-":
		print a-b
	elif op == "/":
		print a/b
	elif op == "*":
		print a*b
	else:
		break

Solution (Python):
while True:
	a,b,c = input().split()

	if b == "?":
		break
	elif b == "+":
		s = int(a)+int(c)
	elif b == "-":
		s = int(a)-int(c)
		
	elif b == "*":
		s = int(a)*int(c)
		
	else :
		s = int(a)/int(c)
	print(int(s))

Solution (Python):
while True:
	a, op, b = input().split()
	a = int(a)
	b = int(b)
	if op == "+": print(a + b)
	elif op == "-": print(a - b)
	elif op == "*": print(a * b)
	elif op == "/": print(a // b)
	else: break

Solution (Python):
while True:
    a,op,b = raw_input().split()
    a = int(a)
    b = int(b)
    if op == "+":
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b
    elif op == "?":
        break

Solution (Python):


while True:

	l = raw_input().split()

	a = int(l[0])
	b = int(l[2])

	op =l[1]



	if op == "+":
		x = a + b
		print x

	if op == "-":
		x = a - b
		print x

	if op == "*":
		x = a * b
		print x

	if op == "/":
		x = a / b
		print "%d" %x


	if op == "?":
		break

Solution (Python):
while True:
	a,op,b=input().split()
	a,b=map(int,[a,b])
	if op=='+':
		print(a+b)
	elif op=='-':
		print(a-b)
	elif op=='*':
		print(a*b)
	elif op=='/':
		print(a//b)
	else:
		break

Solution (Python):
while True:
    a,b,c = input().split()
    if b=='?':
        break
    elif b =='+':
        d = int(a) + int(c)
    elif b=='-':
        d = int(a) - int(c)
    elif b=='*':
        d = int(a)*int(c)
    else :
        d = int(a)/int(c)
    print(int(d))

Solution (Python):
ct=-1
a=[0]*100000
b=[0]*100000
c=[0]*100000
while True:
    ct+=1
    a[ct],b[ct],c[ct]=map(str,raw_input().split())
    if b[ct]=="?":
        break
    else:
        continue
for i in xrange(ct):
    if b[i]=="+":
        print(int(a[i])+int(c[i]))
    elif b[i]=="-":
        print(int(a[i])-int(c[i]))
    elif b[i]=="*":
        print(int(a[i])*int(c[i]))
    else:
        print(int(a[i])/int(c[i]))

Solution (Python):
while True:
  a, op, b = input().split()
  a = int(a)
  b = int(b)
  if op == '+': print(a + b)
  elif op == '-': print(a - b)
  elif op == '*': print(a * b)
  elif op == '/': print(a // b)
  else: break

Solution (Python):


ans = []
for i in xrange(20000):
    a, op, b = raw_input().split()
    if op == "?":
        break
    else:
        if op == "+":
            ans.append(int(a) + int(b))
        elif op == "-":
            ans.append(int(a) - int(b))
        elif op == "*":
            ans.append(int(a) * int(b))
        else:
            ans.append(int(a) / int(b))

for n in xrange(len(ans)):
    print(ans[n])

Solution (Python):
while True:
    a,b,c=map(str,raw_input().split())
    a,c=int(a),int(c)
    if b=="?":
        break
    if   b=="+":
        print(a+c)
    elif b=="-":
        print(a-c)
    elif b=="*":
        print(a*c)
    else:
        print(a//c)

Solution (Python):
while True:
    a, op, b = map(str, raw_input().split())

    if op in "+":
        print int(a)+int(b) 
    elif op in "-":
        print int(a)-int(b)
    elif op in "*":
        print int(a)*int(b)
    elif op in "/":
        print int(a)/int(b)
    else :
        break;

Solution (Python):
while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if op == '+':
        print (a + b)
    elif op == '-':
        print (a - b)
    elif op == '*':
        print (a * b)
    elif op == '/':
        print (a // b)
    else:
        break

Solution (Python):
while 1:
	a, op, b = raw_input().split()
	a = int(a)
	b = int(b)
	if op == '+':
		print a + b
	if op == '-':
		print a - b
	if op == '*':
		print a * b
	if op == '/':
		print a / b
	if op == '?':
		break

Solution (Python):


ans = []
while True:
    a, op, b = raw_input().split()
    if op == "?":
        break
    else:
        if op == "+":
            ans.append(int(a) + int(b))
        elif op == "-":
            ans.append(int(a) - int(b))
        elif op == "*":
            ans.append(int(a) * int(b))
        else:
            ans.append(int(a) / int(b))

for n in xrange(len(ans)):
    print(ans[n])

Solution (Python):
while(True):
    a, op, b = input().split()
    if op == '?':
        break
    elif op == '+':
        print(int(a) + int(b))
    elif op == '-':
        print(int(a) - int(b))
    elif op == '*':
        print(int(a) * int(b))
    elif op == '/':
        print(int(a) // int(b))

Solution (Python):


while True:
    line = map(str, raw_input().split())
    x = int(line[0])
    op = line[1]
    y = int(line[2])
    if op == "?":
        break
    elif op == "+":
        print x+y
    elif op == "-":
        print x-y
    elif op == "*":
        print x*y
    elif op == "/":
        print x/y

Solution (Python):


while True:
    a,op,b = map(str, input().split())
    c = int(a)
    d = int(b)
    if op == '+': result = c + d
    if op == '-': result = c - d
    if op == '*': result = c * d
    if op == '/': result = int(c / d)
    if op == '?': break
    print("{0}".format(result))

Solution (Python):
while True:
    s = raw_input().split()
    if s[1] == '?':
        break
    elif s[1]=='+':
        print (int(s[0])+int(s[2])) 
    elif s[1]=='-':
        print (int(s[0])-int(s[2])) 
    elif s[1]=='*':
        print (int(s[0])*int(s[2])) 
    elif s[1]=='/':
        print (int(s[0])/int(s[2]))

Solution (Python):
while 1:
    a,op,b=input().split()
    if op == '+':
        r = int(a)+int(b)
    elif op == '-':
        r = int(a)-int(b)
    elif op == '*':
        r = int(a)*int(b)
    elif op == '/':
        r = int(a)//int(b)
    elif op == '?':
        break;
    print(r)

Solution (Python):
while True:
    a,op,b = raw_input().split()
    a = int(a)
    b = int(b)
    if op == "+":
        print a+b
    elif op == "-":
        print a-b
    elif op == "*":
        print a*b
    elif op == "/":
        print a/b
    else :
        break

Solution (Python):
class SimpleCalculator:
    def calc(self, a, op, b):
        if op == '+':
            print a + b
        elif op == '-':
            print a - b
        elif op == '*':
            print a * b
        elif op == '/':
            print a / b

if __name__ == "__main__":
    sc = SimpleCalculator()
    while True:
        a, op, b = map(str, raw_input().split())
        if op == "?":
            break
        sc.calc(int(a), op, int(b))

Solution (Python):
i = 1

while i == 1:
    x = raw_input()
    a, op, b = x.split(" ")
    a = int(a)
    b = int(b)
    
    if op == "?":
        i = 0
    elif op == "+":
        print ("%d" %(a+b))
    elif op == "-":
        print ("%d" %(a-b))
    elif op == "*":
        print ("%d" %(a*b))
    else:
        print("%d" %(a/b))

Solution (Python):
def num(v):
	try:
		return int(v)
	except Exception:
		return v

ALL_calc = []
while True:
	N =  input().split(' ')
	if N[1] == '?':
		break
		
	N_calc = []
	for i in range(len(N)):
		N_calc.append(num(N[i]))
	ALL_calc.append(N_calc)
	
for i in range(len(ALL_calc)):
	if ALL_calc[i][1] == '+':
		print(ALL_calc[i][0] + ALL_calc[i][2])
	elif ALL_calc[i][1] == '-':
		print(ALL_calc[i][0] - ALL_calc[i][2])
	elif ALL_calc[i][1] == '*':
		print(ALL_calc[i][0] * ALL_calc[i][2])
	elif ALL_calc[i][1] == '/':
		print(ALL_calc[i][0] // ALL_calc[i][2])

Solution (Python):
op = "$"

while op != "?":
	a, op, c = map(str, raw_input().split())
	a = int(a)
	c = int(c)

	if   op == "+":
		print u"%d" % (a+c)
	elif op == "-":
		print u"%d" % (a-c)
	elif op == "*":
		print u"%d" % (a*c)
	elif op == "/":
		print u"%d" % (a/c)
	else:
		break

Solution (Python):
l=raw_input()
k=l.split()
a=int(k[0])
op=k[1]
b=int(k[2])

while op<>'?':
        if op=='+':
                print a + b
        if op=='-':
                print a - b
        if op=='*':
                print a * b
        if op=='/':
                print a / b

        l=raw_input()
        k=l.split()
        a=int(k[0])
        op=k[1]
        b=int(k[2])

Solution (Python):

while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)

    if op == '+':
        c = a+b
        print(c)
    elif op == '-':
        c = a-b
        print(c)
    elif op == '*':
        c = a*b
        print(c)
    elif op == '/':
        c = a//b
        print(c)
    elif op == '?':
        break

Solution (Python):
import sys

while(True):
    a, op, b = sys.stdin.readline().split()
    if(op == '?'):
        break
    a, b = map(int, [a, b])
    ans = 0
    if(op == '+'):
        ans = a + b
    if(op == '-'):
        ans = a - b
    if(op == '*'):
        ans = a * b
    if(op == '/'):
        ans = int(a / b)
    print(ans)

Solution (Python):
while(True):
    vals = input().split()
    a = int(vals[0])
    op = vals[1]
    b = int(vals[2])

    if op == '?': break
    if op == '+': print(a + b)
    if op == '-': print(a - b)
    if op == '*': print(a * b)
    if op == '/': print(a // b)

Solution (Python):
while(1):
    a, op, b = input().split()
    if op == '?':
        break
    elif op == '+':
        print(int(a) + int(b))
    elif op == '-':
        print(int(a) - int(b))
    elif op == '*':
        print(int(a) * int(b))
    elif op == '/':
        print(int(int(a) / int(b)))

Solution (Python):































import sys

output = []


while 1:
	a,op,b = input().split()
	a= int(a)
	b= int(b)

	if op=="+":
		output.append(a+b)
	elif op =="-":
		output.append(a-b)
	elif op =="*":
		output.append(a*b)
	elif op =="/":
		output.append( int(a/b) )
	elif op =="?":
		break;
	else:
		sys.exit()

for i in range( len(output)):
	print(output[i])

Solution (Python):
ss = input("").split()
a = int(ss[0])
b = ss[1]
c = int(ss[2])

while b != "?":
    if b == "+":
        result = int(a + c)
    elif b == "-":
        result = int(a - c)
    elif b == "*":
        result = int(a * c)
    elif b== "/":
        result = int(a / c)

    print("{0}".format(result))
    ss = input("").split()
    a = int(ss[0])
    b = ss[1]
    c = int(ss[2])

Solution (Python):
while True:
    Input = input().split()
    a = int(Input[0])
    op = Input[1]
    b = int(Input[2])
    if a >= 0 and b >= 0 and a <= 20000 and b <= 20000:
        if op == "+":
            print(a + b)
        elif op == "-":
            print(a - b)
        elif op == "*":
            print(a * b)
        elif op == "/":
            if b != 0:
                print(int(a / b))
        elif op == "?":
            break

Solution (Python):
while 1:
	a,op,b=map(str,raw_input().split())
	a=int(a)
	b=int(b)

	if op=='?':
		break
	elif op=='+':
		print a+b
	elif op=='-':
		print a-b
	elif op=='*':
		print a*b
	elif op=='/':
		print a/b

Solution (Python):


def main():
	res = []
	while True:		
		try:
			res.append(int(eval(input())))
		except:
			[print(i) for i in res]
			return
if __name__ == '__main__':
  main()

Solution (Python):
while True:
  a, op, b = input().split()
  a = int(a)
  b = int(b)
  if op == '+': print(a + b)
  elif op == '-': print(a - b)
  elif op == '/': print(a // b)
  elif op == '*': print(a * b)
  else: break

Solution (Python):
while True:
    a,op,b=input().split()
    if op=='?': break
    elif op=='+': print( int(a) +  int(b) )
    elif op=='-': print( int(a) -  int(b) )
    elif op=='*': print( int(a) *  int(b) )
    elif op=='/': print( int(a) // int(b) )

Solution (Python):
import math

while True:
    a, op, b = map(str, input().split())
    a = int(a)
    b = int(b)
    if 0 <= a and b < 20001:
        if op == "+":
            answer = a + b
            print(answer)
        elif op == "-":
            answer = a - b
            print(answer)
        elif op == "*":
            answer = a * b
            print(answer)
        elif op == "/":
            answer = a / b
            print(math.floor(answer))
        elif op == "?":
            break
    else:
        if op == "?":
            break
        else:
            continue

Solution (Python):
while True:
    a,op,b=input().split()
    if op=='?': break
    eval("print( int(int(a) {0} int(b)) )".format(op))

Solution (Python):
while 1:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
import math

while 1 :
    a, op, b = raw_input().split()
    a, b = map(int, [a, b])

    if op == "+" :
        print a + b
    elif op == "-" :
        print a - b
    elif op == "*" :
        print a * b
    elif op == "/" :
        print a / b
    else :
        break

Solution (Python):
while True:
    n = input().split()
    a,b = int(n[0]),int(n[2])
    if n[1] == '+':
        print(a + b)
    elif n[1] == '-':
        print(a - b)
    elif n[1] == '*':
        print(a * b)
    elif n[1] == '/':
        print(a // b)
    else:
        if n[1] == '?':
            break

Solution (Python):
while(True):
        a,op,b = input().split()
        a = int(a)
        b = int(b)
        if op == '+':
                print(a+b)
        elif op == '-':
                print(a-b)
        elif op == '*':
                print(a*b)
        elif op == '/':
                print(a//b)
        else :
                break

Solution (Python):
while True:
    arr = input().split()
    a = int(arr[0])
    op = arr[1]
    b = int(arr[2])
    if op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)
    else:
        break

Solution (Python):
while True:
    l = list(input().split())
    a = int(l[0])
    op = l[1]
    b = int(l[2])
    
    if op == "?":
        break
    
    if op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)

Solution (Python):
if __name__ == "__main__":
	list = {}
	i = 0
	while True:
		a,op,b = input().split()
		a,b = map(int,[a,b])
		if op == '+':
			list[i] = a+b
		elif op == '-':
			list[i] = a - b
		elif op == '*':
			list[i] = a*b
		elif op == '/':
			c = a/b
			list[i] = int(c)
		else:
			break
		i +=1
	for i in range(len(list)):
		print (list[i])

Solution (Python):
while(True):
    a=input().split()
    a[0]=int(a[0])
    a[2]=int(a[2])
    if(a[1]=="?"):
        break
    elif(a[1]=="+"):
        print(a[0]+a[2])
    elif(a[1]=="-"):
        print(a[0]-a[2])
    elif(a[1]=="*"):
        print(a[0]*a[2])
    elif(a[1]=="/"):
        print(a[0]//a[2])

Solution (Python):
while  True:
    inputs = input().split()
    a = int(inputs[0])
    op = inputs[1]
    b = int(inputs[2])

    if op == "?":
        break

    result = 0
    if op == "+":
        result = a + b
    elif op == "-":
        result = a - b
    elif op == "*":
        result = a * b
    elif op == "/":
        result = int(a / b)
    print(result)

Solution (Python):
while True:
    a, b, c = input().split()
    a = int(a)
    c = int(c)
    if b == "?":
        break
    elif b == "-":
        d = a - c
    elif b == "+":
        d = a + c
    elif b == "*":
        d = a * c
    elif b == "/":
        d = a // c
    print(d)

Solution (Python):
a = []
while True:
    x = map(str, raw_input().split())
    if x[1] == '?':
        break
    if x[1] == '+':
        a.append(int(x[0]) + int(x[2]))
    if x[1] == '-':
        a.append(int(x[0]) - int(x[2]))
    if x[1] == '*':
        a.append(int(x[0]) * int(x[2]))
    if x[1] == '/':
        a.append(int(x[0]) / int(x[2]))
for i in range(len(a)):
    print a[i]

Solution (Python):
while True :
    i = input().split()
    r = int(i[0])
    op = i[1]
    l = int(i[2])
    if op == '?':
        break
    else:
        if op == '+':
            print(str(r+l))
        elif op == '-':
            print(str(r-l))
        elif op == '*':
            print(str(r*l))
        else :
            print(str(r//l))

Solution (Python):
while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if(op == "?"):
        break
    elif(op == "+"):
        print(a+b)
    elif(op == "-"):
        print(a-b)
    elif(op == "*"):
        print(a*b)
    elif(op == "/"):
        print(a//b)

Solution (Python):
while True:
	a, op, b = input().split()
	if op == "?": break
	a = int(a)
	b = int(b)

	if (op == "+"):
		print(a + b)
	elif (op == "-"):
		print(a - b)
	elif (op == "*"):
		print(a * b)
	elif (op == "/"):
		print(a // b)

Solution (Python):
while 1:
        i  =  raw_input().split()
        a = int(i[0])
        op = i[1]
        b = int(i[2])

        if op == "+":
                x = a+b
        elif op == "-":
                x = a-b
        elif op == "*":
                x = a*b
        elif op == "/":
                x = a/b
        elif op == "?":
                break
        print  x

Solution (Python):
def calc(a, b, op):
    if op == "+":
        return a + b;
    elif op == "-":
        return a - b;
    elif op == "*":
        return a * b;
    elif op == "/":
        return a / b;
    elif op == "?":
        return None;

while True:
    a, op, b = input().split()
    result = calc(int(a), int(b), op)
    if result is not None:
        print(int(result));
    else:
        break;

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break

    if op == '+':
        print(a + b)
    
    if op == '-':
        print(a - b)
        
    if op == '*':
        print(a * b)
    
    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
 
    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)
    
    if op == '*':
        print(a * b)

    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == '?':
        break
    if op == '+':
        print(a+b)
    if op == '-':
        print(a-b)
    if op == '*':
        print(a*b)
    if op == '/':
        print(a//b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    
    if op == '?':
        break
    
    if op == '+':
        print(a + b)
    
    if op == '-':
        print(a - b)
        
    if op == '*':
        print(a * b)
        
    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == '?':
        break
    if op == '+':
        print(a+b)
    if op == '-':
        print(a-b)
    if op == '*':
        print(a*b)
    if op == '/':
        print(a//b)

Solution (Python):
while True:
    a,op,b = input().split()
    a =int(a)
    b =int(b)
    
    if op == '?':
        break
     
    if op == '+':
        print(a+b)

    if op == '-':
        print(a-b)

    if op == '*':
        print(a*b)
 
    if op == '/':
        print(a//b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        print(a * b)

    if op == '/':
        print(a // b)

Solution (Python):
while True:

     a, op, b = input().split()

     a = int(a)
     b = int(b)

     if op == '?':
         break
     if op == '+':
         print(a + b)
     if op == '-':
         print(a - b)
     if op == '*':
         print(a * b)
     if op == '/':
         print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        print(a *b)

    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    
    if op == '?':
        break
        
        
    if op == '+':
        print(a + b)
        
    if op == '-':
        print(a - b)
        
    if op == '*':
        print(a * b)
        
    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
 
    if op == '?':
        break
 
    if op == '+':
        print(a + b)
 
    if op == '-':
        print(a - b)
 
    if op == '*':
        print(a *b)
 
    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a -b)
 
    if op == '*':
        print(a * b)
   
    if op == '/':
        print(a // b)

Solution (Python):
while True:
    abc = input()
    if '?' in abc:
        break
    print(eval(abc.replace('/','//')))

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
  
    if op == '?':
        break
  
    if op == '+':
        print(a + b)
  
    if op == '-':
        print(a - b)
  
    if op == '*':
        print(a *b)
  
    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
   
    if op == '?':
        break
   
    if op == '+':
        print(a + b)
   
    if op == '-':
        print(a - b)
   
    if op == '*':
        print(a *b)
   
    if op == '/':
        print(a // b)

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        print(a * b)

    if op == '/':
        print(a // b)

Solution (Python):
while True:

    x, y, z = input().split()
    l = int(x)
    r = int(z)
    if y == '+':
        print(l + r)
    elif y == '-':
        print(l - r)
    elif y == '/':
        print(l // r)
    elif y == '*':
        print(l * r)
    else:
        break

Solution (Python):
while True:
	a,b,c = input().split()
	num_1 = int(a)
	num_2 = int(c)

	if b == '?':
		break
	elif b == '+':
		print(num_1 + num_2)
	elif b == '-':
		print(num_1 - num_2)
	elif b == '*':
		print(num_1 * num_2)
	else:
		print(num_1 // num_2)

Solution (Python):
while True:
    a, op, b = input().split()
    if op == '?':
        break
    if op == '/':
        op = '//'
    print(eval(a + op + b))

Solution (Python):
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op=="?":
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Solution (Python):
while True:
	a,op,b = raw_input().split()
	a = int(a)
	b = int(b)
	if op == '+':
		r = a + b
	elif op == '-':
		r = a - b
	elif op == '*':
		r = a * b
	elif op == '/':
		r = a / b
	else:
		break
	print r

Solution (Python):
while True:
    L = raw_input().split()

    a = int(L[0])
    o = (L[1])
    b = int(L[2])

    if o == "?":
         break
        
    elif o == "+":
        print a + b
    elif o == "-":
        print a - b
    elif o == "*":
        print a * b
    elif o == "/":
        print a/b

Solution (Python):
while 1:
	n = input().split()
	a = int(n[0])
	op = n[1]
	b = int(n[2])
	if op == "?":
		break
	if op == "+":
		print(a+b)
	elif op == "-":
		print(a-b)
	elif op == "*":
		print(a*b)
	elif op == "/":
		print(int(a/b))

Solution (Python):
while True:
    r = input()
    a = r.split(' ')
    if a[1] == '+':
        b = int(a[0])+int(a[2])
        print(b)
    elif a[1] == '-':
        c = int(a[0])-int(a[2])
        print(c)
    elif a[1] == '*':
        d = int(a[0])*int(a[2])
        print(d)
    elif a[1] == '/':
        e = int(a[0])//int(a[2])
        print(e)
    else:
        break