epsi = 0.0001
term = 1
sum = 1
def fact (n):
prod = 1
if n == 0:
return 1
else:
for i in range (n):
prod *= (i+1)
return prod
x = float(input())
k = 1
while abs(term) > epsi:
term = (x**k)/fact(k)
sum += term
k += 1
print sum
ZXBzaSA9IDAuMDAwMQp0ZXJtID0gMQpzdW0gPSAxCmRlZiBmYWN0IChuKToKICAgcHJvZCA9IDEKICAgaWYgbiA9PSAwOgogICAgICByZXR1cm4gMQogICBlbHNlOgogICAgICBmb3IgaSBpbiByYW5nZSAobik6CiAgICAgICAgIHByb2QgKj0gKGkrMSkKICAgICAgcmV0dXJuIHByb2QKeCA9IGZsb2F0KGlucHV0KCkpCmsgPSAxCndoaWxlIGFicyh0ZXJtKSA+IGVwc2k6CiAgIHRlcm0gPSAoeCoqaykvZmFjdChrKQogICBzdW0gKz0gdGVybQogICBrICs9IDEKcHJpbnQgc3Vt