import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author grolegor
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[] x = {500, 1000, 1500, 2000, 2500};
            int[] m = new int[5];
            for (int i = 0; i < 5; i++) {
                m[i] = in.nextInt();
            }
            int[] w = new int[5];
            for (int i = 0; i < 5; i++) {
                w[i] = in.nextInt();
            }
            int hs = in.nextInt();
            int hu = in.nextInt();

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

                int f = (x[i] * 3 * 250) / 10;
                int up = 250 * x[i] - m[i] * x[i] - 12500 * w[i];
                ans += Math.max(f, up);
            }
            ans += 250 * 100 * hs - 250 * 50 * hu;
            out.println(ans / 250);
        }

    }
}

