# L-17.0 MCS 260 Fri 25 Jul 2014 : dyneval.py
"""
Thanks to Python's dynamic typing,
expressions may be evaluated dynamically
as well, via the "eval" command.
Any valid Python expression the user
enters will be evaluated at the given x.
"""

from math import cos, sin
E = raw_input('f(x) = ')
XRAW = raw_input('x = ')
x = float(XRAW)
Y = eval(E)
print E + ' at x = ' + str(x)
print 'equals ' + str(Y)
