#Z12202. 计算多项式的值

计算多项式的值

Description

For the polynomial f(x)=ax3+bx2+cx+df(x) = ax^3 + bx^2 + cx + d and given values of a,b,c,d,xa, b, c, d, x,
compute the value of f(x)f(x), rounded to 7 decimal places.

Input Format

The input consists of a single line containing 5 real numbers: xx, followed by the coefficients a,b,c,da, b, c, d. Each number is a double-precision floating-point value with an absolute value not exceeding 100. The numbers are separated by a single space.

Output Format

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

2.31 1.2 2 2 3

33.0838692