1376: 计算多项式的值

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:75 Solved:57

Description

对于多项式f(x)=ax3+bx2+cx+d和给定的a,b,c,d,x,计算f(x)的值,保留到小数点后7位。

Input

输入仅一行,包含5个实数,分别是x,及参数a、b、c、d的值,每个数都是绝对值不超过100的双精度浮点数。数与数之间以一个空格分开。

Output

输出一个实数,即f(x)的值,保留到小数点后7位。

Sample Input Copy

2.31 1.2 2 2 3

Sample Output Copy

33.0838692