import java.util.*;
import java.io.*;

public class A {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        long[] a = new long[5];
        long[] b = new long[5];
        long[] c = new long[5];
        for (int i = 0; i < 5; i++) {
            a[i] = in.nextInt();
            c[i] = (i + 1) * 500;
        }
        for (int i = 0; i < 5; i++) {
            b[i] = in.nextInt();
        }
        long sum = 0;
        for (int i = 0; i < 5; i++) {
            sum += Math.max(c[i] / 10 * 3, (c[i] / 250) * (250 - a[i]) - 50 * b[i]);
        }
        long h1 = in.nextInt();
        long h2 = in.nextInt();
        System.out.println(sum + h1 * 100 - h2 * 50);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }

    public static void main(String[] arg) {
        new A().run();
    }
}