import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Kevin {

    public static double totRaw(int[] m, int[] w) {
        // System.out.println(Arrays.toString(m));
        // System.out.println(Arrays.toString(w));
        int[] x = new int[] {500, 1000, 1500, 2000, 2500};
        double tot = 0;
        for (int i = 0; i < m.length; i++) {
            tot += Math.max ((0.3 * x[i]) , ( (1.0 - m[i]/250.0) * x[i] - 50.0 * w[i] ));
        }
        return tot;
    }

    public static void main(String[] args) {
        ArrayList<String> arg = new ArrayList<>(); 
        
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 
            while (arg.size() < 3) {
                arg.add(br.readLine());
            }
            String[] mraw = arg.get(0).split(" ");
            String[] wraw = arg.get(1).split(" ");
            int[] m = new int[mraw.length];
            int[] w = new int[wraw.length];
            for (int i = 0; i < mraw.length; i++) {
                m[i] = Integer.parseInt(mraw[i]);
                w[i] = Integer.parseInt(wraw[i]);
            }
            double tot = totRaw(m, w);
            int sHacks = Integer.parseInt(arg.get(2).split(" ")[0] );
            int fHacks = Integer.parseInt(arg.get(2).split(" ")[1] );
            tot = tot + sHacks * 100 - fHacks * 50;
            System.out.println((int) tot);
            
        } catch(IOException io) {
            io.printStackTrace();
        }      
        
    }

}
