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

public class UncowedForces {

	
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		int[] x = {500, 1000, 1500, 2000, 2500};
		
		StringTokenizer s = new StringTokenizer(in.readLine());
		int[] m = new int[5];
		for (int i = 0; i < 5; i++) {
			m[i] = Integer.parseInt(s.nextToken());
		}
		
		s = new StringTokenizer(in.readLine());
		int[] w = new int[5];
		for (int i = 0; i < 5; i++) {
			w[i] = Integer.parseInt(s.nextToken());
		}
		
		s = new StringTokenizer(in.readLine());
		int hs = Integer.parseInt(s.nextToken());
		int hu = Integer.parseInt(s.nextToken());
		
		int res = hs * 100 - hu * 50;
		for (int i = 0; i < 5; i++) {
			int score = (int) Math.max(3 * x[i] / 10, (x[i] - ((m[i] * x[i]) / 250)) - 50 * w[i]);
			res += score;
		}
		
		System.out.println(res);
	}
}
