#define bool int
#define false 0
#define true 1
/*
bool i
if( i= true) ...........;//如果i为1
if( i = false).............;//如果i为0
*/
struct Number
{
float quescore[4];
float M;
bool charge;
int paiming;
}num;
int i,ques[4],tempvalue,tempvalue1;
float sum=0.0;
void main(void)
{
for(i=0;i<4;i++)
{
scanf("%d",&ques[i]);
}
scanf("%f%d%d",&num.M,&num.charge,&num.paiming);
for(i=0;i<4;i++)
{
if(ques[i]!=0)
{
num.quescore[i]=num.M / ques[i];
sum+=num.quescore[i];
}
else if(ques[i]==0)
{
num.quescore[i]=0.0;
}
}
if(num.charge==true)
{
tempvalue1=5;
tempvalue=5-2*(num.paiming-1);
}
if(num.charge==false)
{
tempvalue1=0;
tempvalue=5-2*(num.paiming-1);
}
sum+=(tempvalue+tempvalue1);
printf("dwy共得到%f元",sum);
}