import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String nStr = in.nextLine();
        String wStr = in.nextLine();
        int ss = in.nextInt();
        int su = in.nextInt();
        int sumS = ss * 100 - su * 50;
        int point = 0;
        String[] nArr = nStr.split(" ");
        int[] n = new int[nArr.length];
        String[] wArr = wStr.split(" ");
        int[] w = new int[wArr.length];

        n[0] = Integer.parseInt(nArr[0]);
        w[0] = Integer.parseInt(wArr[0]);
        for (int i = 1; i < nArr.length; i++) {
            n[i] = Integer.parseInt(nArr[i]);
            w[i] = Integer.parseInt(wArr[i]);
        }
        if (ss >= 1) {
            for (int i = 0; i < 5; i++) {
                point += Math.max(150 * (i + 1), (1 - n[i] / 250.0) * (500 * (i + 1)) - (50 * w[i]));
            }

        }
        System.out.println(point + sumS);

    }
}
