#include <stdio.h>

int main() 
{
    float a,b,c,d;
    scanf("%f %f %f %f",&a,&b,&c,&d);
    printf("%.1f",a/5+b/10+c/5+d/2);
    return 0;
}