import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Solution {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] input = in.readLine().split(" ");
		int[] arr = new int[5];
		for (int i = 0; i < 5; i++) {
			arr[i] = Integer.parseInt(input[i]);
		}
		input = in.readLine().split(" ");
		int[] wrong = new int[5];
		for (int i = 0; i < 5; i++) {
			wrong[i] = Integer.parseInt(input[i]);
		}
		input = in.readLine().split(" ");
		in.close();
		int hs = Integer.parseInt(input[0]);
		int hw = Integer.parseInt(input[1]);
		int[] score = {500, 1000, 1500, 2000, 2500};
		int total = 0;
		for (int i = 0; i < 5; i++) {
			total += Math.max(0.3 * score[i], (1 - arr[i] / 250.0) * score[i] - 50 * wrong[i]);
		}
		total += hs * 100;
		total -= hw * 50;
		System.out.println(total);
	}
}