import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class A {
    public static void main(String[] args) throws IOException {
        File inputFile = new File("entradaA");
        if (inputFile.exists())
            System.setIn(new FileInputStream(inputFile));
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        String line = "";
        int[] p = { 500, 1000, 1500, 2000, 2500 };
        while ((line = in.readLine()) != null && line.length() != 0) {
            int[] m = readInts(line);
            int[] w = readInts(in.readLine());
            int[] h = readInts(in.readLine());
            double sum = 0;
            for (int i = 0; i < 5; i++)
                sum += Math.max(0.3 * p[i], (((250.0 - m[i]) / 250.0) * p[i]) - 50 * w[i]);
            sum = Math.max(0, sum + 100 * h[0] - 50 * h[1]);
            long ans = (long)Math.round(sum);
            out.append(ans + "\n");
        }
        System.out.print(out);
    }

    public static int[] readInts(String line) {
        String[] w = line.trim().split("\\s+");
        int[] a = new int[w.length];
        for (int i = 0; i < a.length; i++)
            a[i] = Integer.parseInt(w[i]);
        return a;
    }
}
