import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {
    static int[] calc = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6};

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] x = {500, 1000, 1500, 2000, 2500};
        int[] m = new int[5];
        int[] w = new int[5];
        int[] h = new int[2];

        readMas(m, in);
        readMas(w, in);
        readMas(h, in);

        printMas(m);
        printMas(w);
        printMas(h);

        int points = 0;
        points += 100 * h[0] - 50 * h[1];

        for (int i = 0; i < 5; i++) {
            points += Math.max(0.3 * x[i], (1.0 - m[i] / 250.0) * x[i] - 50.0 * w[i]);
        }

        System.out.println(points);

    }

    public static void readMas(int[] mas, Scanner in) {
        for (int i = 0; i < mas.length; i++) {
            mas[i] = in.nextInt();
        }
    }

    public static void printMas(int[] mas) {
        for (int i = 0; i < mas.length; i++) {
            System.out.print(mas[i] + " ");
        }
        System.out.println();
    }
}
