#include <stdio.h>

int main() {

    int experiment, behave, process, exam;
    float total = 0;

    scanf("%d %d %d %d", &experiment, &behave, &process, &exam);//输入成绩

    total = 0.2 * experiment + 0.1 * behave + 0.2 * process + 0.5 * exam;//计算总分

    printf("%.1f\n", total);//打印输出

    return 0;

}