#B2080. Polynomial Value Calculation

    ID: 11162 Type: Default 1000ms 256MiB

Polynomial Value Calculation

Polynomial Value Calculation

Given a single precision floating-point number x and a positive integer n, compute the value of the polynomial

$$x^n+x^{n-1}+\cdots+x^2+x+1$$

The result should be rounded to two decimal places. It is guaranteed that the final result is within the range of a double.

inputFormat

The input consists of a single line containing a single precision floating-point number x and a positive integer n separated by space.

outputFormat

Output the value of the polynomial rounded to two decimal places.

sample

1.0 3
4.00