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

public class Solution {

	public static void main(String args[]) {

		Scanner in;
		try {
			in = new Scanner(new File("input.txt"));
		} catch (Exception e) {
			in = new Scanner(System.in);
		}

		int[] ms = new int[5];
		int[] ws = new int[5];

		for (int i = 0; i < 5; ++i) {
			ms[i] = in.nextInt();
		}
		for (int i = 0; i < 5; ++i) {
			ws[i] = in.nextInt();
		}

		int s = in.nextInt();
		int u = in.nextInt();

		int res = 0;
		int score = 500;
		for (int i = 0; i < 5; ++i) {
			int thisRes = (int) Math.round(Math.max(0.3*score,(1 - ms[i]/250.0)*score - 50*ws[i]));
			res += thisRes;
			score += 500;
		}

		res += s * 100;
		res -= u * 50;

		System.out.println(res);
	}
}