#include<stdio.h>
int main(void)
{
    int a,b,c,d;
    scanf("%d %d %d %d",&a,&b,&c,&d);
    double result=0.2*a+0.1*b+0.2*c+0.5*d;
    printf("%.1f",result);
    return 0;
}