#Z14403. 计算多项式的值

计算多项式的值

Description

Given a polynomial in the form of xn+xn1++x2+x+1x^n + x^{n-1} + … + x^2 + x + 1, calculate the value of this polynomial for a given single-precision floating-point number x and a positive integer n.
x is within the float range, and n ≤ 1000000. The value of the polynomial should be accurate to two decimal places, and it is guaranteed that the final result will be within the float range.

Input Format

The input consists of a single line containing x and n, separated by a single space. x is within the float range, and n ≤ 1000000.

Output Format

Output a real number representing the value of the polynomial, accurate to two decimal places. It is guaranteed that the final result will be within the float range.

2.0 4

31.00