#P79. 练14.4 计算多项式的值

练14.4 计算多项式的值

Description

For the polynomial f(x)=ax3+bx2+cx+df(x)=ax^3+bx^2+cx+d and given values of aa, bb, cc, dd, and xx, calculate the value of f(x)f(x), rounded to 7 decimal places.

Input Format

Input consists of a single line with 5 real numbers: xx, and the parameters aa, bb, cc, and dd. Each number is a double-precision floating-point number with an absolute value not exceeding 100. The numbers are separated by spaces.

Output Format

Output a real number representing the value of f(x)f(x), rounded to 7 decimal places.

Sample

2.31 1.2 2 2 3
33.0838692