10825: 循环结构练习-4

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:3 Solved:0

Description

按泰勒级数公式e = 1 + 1/1! + 1/2! +1/3! + ... + 1/n!求e的值。

其中n的值由键盘输入,计算并输出结果(保留5位小数)。

Input

4

Output

2.70833

Sample Input Copy

5

Sample Output Copy

2.71667