
import java.util.Scanner;

public class Main {

    public static Scanner input;
    public static int[] a = new int[10];
    public static int[] b = new int[10];
    public static int c, d;

    public static void main(String[] args) {

        int[] res = { 500, 1000, 1500, 2000, 2500 };
        input = new Scanner(System.in);

        while (input.hasNext()) {
            for (int i = 0; i < 5; i++) {
                a[i] = input.nextInt();
            }
            for (int i = 0; i < 5; i++) {
                b[i] = input.nextInt();
            }
            c = input.nextInt();
            d = input.nextInt();

            int ans = 0;
            for (int i = 0; i < 5; i++) {

                int ch = Math.max(75 * res[i], 250 * res[i] - a[i] * res[i]
                        - 250 * 50 * b[i]);
                ch /= 250;
                ans += ch;

            }

            ans = ans + c * 100;
            ans = ans - d * 50;

            System.out.println(ans);
        }

    }

}
