
import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        int[] x = { 500, 1000, 1500, 2000, 2500 };
        int[] m = new int[5];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < m.length; i++)
            m[i] = sc.nextInt();
        int[] w = new int[5];
        for (int i = 0; i < w.length; i++)
            w[i] = sc.nextInt();

        int hs = sc.nextInt();
        int hu = sc.nextInt();
        double score = 100 * hs - 50 * hu;
        for (int i = 0; i < 5; i++) {
            score += Math
                    .max(0.3 * x[i], (1 - m[i] / 250.0) * x[i] - 50 * w[i]);
        }
        System.out.println((int) score);
    }
}
