import java.util.Scanner;

public class A {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        solution(sc);
        sc.close();
    }

    public static void solution(Scanner sc) {
        int[] max = new int[] { 500, 1000, 1500, 2000, 2500 };
        int[] m = new int[5];
        for (int i = 0; i < 5; i++)
            m[i] = sc.nextInt();
        int[] w = new int[5];
        for (int i = 0; i < 5; i++)
            w[i] = sc.nextInt();
        int hs = sc.nextInt();
        int hu = sc.nextInt();
        int total = hs * 100 - hu * 50;
        for (int i = 0; i < 5; i++) {
            int s = (250 - m[i]) * max[i] / 250 - 50 * w[i];
            s = Math.max(max[i] * 3 / 10, s);
            total += s;
        }
        System.out.println(total);
    }
}
