#K73257. Series Sum with Factorials

    ID: 33935 Type: Default 1000ms 256MiB

Series Sum with Factorials

Series Sum with Factorials

Given an integer n, compute the sum of the series defined by

\(S = \sum_{i=1}^{n} \frac{i}{i!}\)

If n = 0, the result is defined to be 0.00. Otherwise, compute the sum and round the result to 2 decimal places.

The input will be provided via standard input (stdin) and the output must be printed to standard output (stdout).

inputFormat

The input consists of a single integer n (where n ≥ 0), provided on a single line from standard input.

outputFormat

Output the sum of the series

\(S = \sum_{i=1}^{n} \frac{i}{i!}\)

rounded to 2 decimal places. The output should be written to standard output.

## sample
0
0.00