import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
 
public class Main
{
    public static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
    public static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    //public static File f = new File("input.txt");
    public static int MAX = 1000000007;
    public static void main(String[] args) throws NumberFormatException, IOException {
        //BufferedReader fin = new BufferedReader(new FileReader(f));
        //long startTime = System.currentTimeMillis();
        
        String[] fline = in.readLine().split(" ");
        int[] m = new int[5];
        for(int i = 0; i < 5; i++){
            m[i] = Integer.parseInt(fline[i]);
        }
        
        String[] sline = in.readLine().split(" ");
        int[] w = new int[5];
        for(int i = 0; i < 5; i++){
            w[i] = Integer.parseInt(sline[i]);
        }
        
        String[] tline = in.readLine().split(" ");
        int hs = Integer.parseInt(tline[0]);
        int hu = Integer.parseInt(tline[1]);
        
        double points = 0;
        for(int i = 0; i < 5; i++){
            int max = 500*(i+1);
            points += Math.max(0.3*max, ((250 - m[i])/250.0)*max - 50*w[i]);
        }
        points += 100*hs;
        points -= 50*hu;
        
        System.out.println(Math.round(points));
        //long endTime = System.currentTimeMillis(); System.out.println("That took " + (endTime - startTime) + " milliseconds");
    }
}