/*
TASK: SOCKS
LANG: C++
*/
#include <iostream>
#include <iomanip>
using namespace std;
int main(void)
{
	int n,k,i,j;
	int p[30];
	double c[31],P=0;
	do
	{
		cin>>n;
	}
	while(n<1||n>30);
	do
	{
		cin>>k;
	}
	while(k<1||k>1000000000);
	for(i=1;i<n+1;i++)
	{
		cin>>p[i];
		if(!cin||p[i]<0) cout<<"Bad Input"<<endl;
	}
	i=1;
	for(j=1;j<n+2;j++)
		cin>>c[j];
	int ch=1;
	while(i<n+1)
	{
		ch=ch*p[i];
		i++;
	}
	i=n;
	j=n+1;
	int hhh=ch;
	if(ch==k) cout<<setiosflags(ios::fixed)<<setprecision(2)<<c[n+1];
	P=P+c[j];
	if(ch<k)
	{
			if(k-ch<ch)
			{
				j--;
				P=P+c[j];
				i--;
				ch=1;
				ch=ch*p[i];
				ch=ch+hhh;
			}
			if(k-ch==ch)
				P=P+c[j];
			if(k-ch>ch)
			{
				do
				{
					P=P+c[j];
					ch=ch+ch;
				}
				while(k-ch>ch);
				do
			{
				j--;
				P=P+c[j];
				i--;
				ch=1;
				ch=ch*p[i];
				ch=ch+hhh;
			}
			while(k-ch>0);
			}
			cout<<setiosflags(ios::fixed)<<setprecision(2)<<P<<endl;
	}
	if(ch>k)
	{
		cout<<setiosflags(ios::fixed)<<setprecision(2)<<P<<endl;
	}
	return 0;
}











