Write a program that reads a number and a polynomial , and computes .
Input consists of a real number followed by the description of the polynomial : the real coefficients , , …, in this order. (The first sample input/output corresponds to the evaluation of at .)
Print with 4 digits after the decimal point.
Input
2 3 4 5
Output
31.0000
Input
3 0 0 10
Output
90.0000
Input
-2.5 1 -2 0 5.4
Output
-78.3750