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

public class Problem604A {

	public static int[] scores = {500, 1000, 1500, 2000, 2500};
	
	public static double formula(double t, int score, int w){
		double res = (1 - (t/250));
		res = res * score;
		res = res - (50 * w);
		return res;
	}
	
	public static int hacks(int G, int B){
		G *= 100;
		B *= 50;
		return G - B;
	}
	
	public static void main( String[] args ) throws java.lang.Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		List<Integer> M = new ArrayList<Integer>();
		List<Integer> W = new ArrayList<Integer>();
		int G, B;
		
		String[] temp = in.readLine().split(" ");
		for(int i = 0; i < 5; i++){
			M.add(Integer.parseInt(temp[i]));
		}
		
		temp = in.readLine().split(" ");
		for(int i = 0; i < 5; i++){
			W.add(Integer.parseInt(temp[i]));
		}
		
		temp = in.readLine().split(" ");
		G = Integer.parseInt(temp[0]);
		B = Integer.parseInt(temp[1]);
		
		double res = 0;
		
		for(int i = 0; i < 5; i++){
			res += Math.max((0.3 * scores[i]), (formula(M.get(i), scores[i], W.get(i))));
		}
		res += hacks(G,B);
		
		System.out.println((int)res);
	}
}
