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

public class CF604A {
	static int score(int x, int m, int w) {
		return Math.max(x * 3 / 10, (250 - m) * x / 250 - 50 * w);
	}
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int m1 = Integer.parseInt(st.nextToken());
		int m2 = Integer.parseInt(st.nextToken());
		int m3 = Integer.parseInt(st.nextToken());
		int m4 = Integer.parseInt(st.nextToken());
		int m5 = Integer.parseInt(st.nextToken());
		st = new StringTokenizer(br.readLine());
		int w1 = Integer.parseInt(st.nextToken());
		int w2 = Integer.parseInt(st.nextToken());
		int w3 = Integer.parseInt(st.nextToken());
		int w4 = Integer.parseInt(st.nextToken());
		int w5 = Integer.parseInt(st.nextToken());
		st = new StringTokenizer(br.readLine());
		int hs = Integer.parseInt(st.nextToken());
		int hu = Integer.parseInt(st.nextToken());
		int total = 100 * hs - 50 * hu;
		total += score(500, m1, w1);
		total += score(1000, m2, w2);
		total += score(1500, m3, w3);
		total += score(2000, m4, w4);
		total += score(2500, m5, w5);
		System.out.println(total);
	}
}
