
//package solution;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

public class Solution implements Runnable {
    
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");
    final boolean OJ = System.getProperty("ONLINE_JUDGE") != null;
    
    void init() throws FileNotFoundException {
        if (OJ) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
            
    }
    
    public void run() {
        try {
            init();
            solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }
    
    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        
        return tok.nextToken();
    }
    
    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * 1l << 20).start();
    }
    
    void solve() throws IOException {
        int[] base = new int[] {500, 1000, 1500, 2000, 2500};
        int[] wrongTries = new int[5];
        int[] time = new int[5];
        for (int i = 0; i < 5; i++) {
            time[i] = readInt();
        }
        for (int i = 0; i < 5; i++) {
            wrongTries[i] = readInt();
        }
        int good = readInt();
        int bad = readInt();
        int ans = 0;
        for (int i = 0; i < 5; i++) {
            ans += Math.max(base[i] * 3 / 10, ((250 - time[i]) * base[i] - 250 * 50 * wrongTries[i]) / 250);
        }
        ans += 100 * good;
        ans -= 50 * bad;
        out.print(ans);
    }
}
