import java.util.Scanner;
public class Main {
    
    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int a,b,c,d;
        double result = 0.0;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        d = sc.nextInt();
        result = a*0.2 + b*0.1 + c*0.2 + d*0.5;
        System.out.println(String.format("%.1f",result));
    }
}