import java.io.*;
import java.util.ArrayList;
import java.util.StringTokenizer;

/**
 * Created by Артур on 01.12.2015.
 *
 * Условие:
 * http://codeforces.com/contest/604/problem/0
 */

import java.io.*;
        import java.util.ArrayList;
        import java.util.StringTokenizer;

public class p2015_12_1_CFR334div2_Prog1_Korovoforses implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input1.txt"));
            out = new PrintWriter("output1.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public static void main(String[] args) {
        new Thread(null, new p2015_12_1_CFR334div2_Prog1_Korovoforses(), "", 256 * (1L << 20)).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    void solve() throws IOException {
        double m1=readDouble();
        double m2=readDouble();
        double m3=readDouble();
        double m4=readDouble();
        double m5=readDouble();
        double w1=readDouble();
        double w2=readDouble();
        double w3=readDouble();
        double w4=readDouble();
        double w5=readDouble();
        double gz=readDouble();
        double nz=readDouble();
        double balls=max((0.3*500),(1-m1/250)*500-50*w1);
        balls+=max( (0.3*1000),(1-m2/250)*1000-50*w2);
        balls+=max( (0.3*1500),(1-m3/250)*1500-50*w3);
        balls+=max( (0.3*2000),(1-m4/250)*2000-50*w4);
        balls+=max( (0.3*2500),(1-m5/250)*2500-50*w5);
        balls=balls+100*gz-50*nz;
        out.print(((int) balls));
    }

    double max(double a, double b){
        if (b>a) {
            return b;
        } else {
            return a;
        }
    }
}
