import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {

    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pr = new PrintWriter(System.out);
        String tokens[];
        tokens = br.readLine().split("\\s+");

        int[] scores = {500, 1000, 1500, 2000, 2500};
        int[] time = new int[tokens.length];
        for (int i = 0; i < tokens.length; ++i)
            time[i] = Integer.parseInt(tokens[i]);

        tokens = br.readLine().split("\\s+");
        int[] wrongSub = new int[tokens.length];
        for (int i = 0; i < tokens.length; ++i)
            wrongSub[i] = Integer.parseInt(tokens[i]);

        tokens = br.readLine().split("\\s+");
        int[] hacks = new int[tokens.length];
        for (int i = 0; i < tokens.length; ++i)
            hacks[i] = Integer.parseInt(tokens[i]);

        int sum = 0;
        for (int i = 0; i < 5; ++i) {
            //pr.println(sum);
            sum+=Math.max(3*scores[i]/10,(250-time[i])*scores[i]/250-50*wrongSub[i]);
        }
        int hackSum = 0;
        for (int i = 0; i < hacks.length; ++i)
            if (hacks[i] > 0)
                sum += 100 * hacks[i];
            else
                sum -= 50 * hacks[i];

        pr.println(sum);
        pr.flush();
        pr.close();

    }
}
