
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the edito

/**
 *
 * @author fatahi
 */
public class Uncowed {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        double sum,hs,hu;
        double m[]=new double[6];
        double w[]=new double [6];
        m[1]=sc.nextDouble();
        m[2]=sc.nextDouble();
        m[3]=sc.nextDouble();
        m[4]=sc.nextDouble();
        m[5]=sc.nextDouble();
        w[1]=sc.nextDouble();
        w[2]=sc.nextDouble();
        w[3]=sc.nextDouble();
        w[4]=sc.nextDouble();
        w[5]=sc.nextDouble();
        hs=sc.nextDouble();
        hu=sc.nextDouble();
        sum=0;
        double x[]=new double[6];
        for (int i = 1; i < 6; i++) {
            x[i]=500*i;
        }
        for (int i = 1; i < 6; i++) {
            double t=m[i]/250;
            sum+=Math.max(0.3*x[i],(((1-t)*x[i])-(50*w[i])));
          
        }
        sum+=hs*100;
        sum-=hu*50;
        
        System.out.println((int)sum);
        
    }
}
