x=float(input())
y=float(input())
c=input()
if c == '+':
print (float(x+y))
if c == '-':
print(float(x-y))
if c == '/':
print(float(x/y))
if c == "mod" and y!=0:
print(x%y)
else:
print('Деление на 0!')
if c == 'pow':
print(float(x**y))
if c == 'div':
print(float(x//y))
elif c == "*":
print(float(x*y))