#include
#include
#define MAXN 10
double f(int n, double a[], double x);
int main()
{
int n, i;
double a[MAXN], x;
scanf("%d %lf", &n, &x);
for (i=0; i<=n; i++)
scanf("%lf", &a[i]);
printf("%.1f\n", f(n,a,x));
return 0;
}
double f(int n, double a[], double x)
{
double m=x,s=0;
int i, j;
for(i=0;i<=n;i++)
{
if(i>1)
{
for(j=0;j m=x*x;
}
if(i==0)
s+=a[0];
else
s=s+m*a[i];
}
return s;
}
/*
double f(int n, double a[], double x)
{
double sum, m;
int i;
for (i=0;i<=n;i++)
{
m=a[i]*pow(x,i);
sum+=m;
}
return sum;
} */