#coding=utf-8
from math import *
formula = input()
h = 1E-5
code = """
def f(x):
return %s
""" % formula
exec(code)
# 请在此处填写代码
#********** Begin **********#
x = eval(input())
y = (f(x+h)-f(x-h))/(2*h)
print('%.2f'%y)
#coding=utf-8
from math import *
formula = input()
h = 1E-5
code = """
def f(x):
return %s
""" % formula
exec(code)
# 请在此处填写代码
#********** Begin **********#
x = eval(input())
y = (f(x+h)-f(x-h))/(2*h)
print('%.2f'%y)