import java.util.*;
import java.io.*;
public class Q1A {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static Scanner sc = new Scanner(System.in);
	//main method
	public static void main(String[] args) throws IOException {
		solve();
	}
	//method to take array input
	private static void takeArrayInput(int[] c) throws IOException {
		String tem[] = br.readLine().split(" ");
		for(int i =0;i<tem.length;i++){
			c[i] = Integer.parseInt(tem[i]);
		}
	}
	//solve question
	private static void solve() throws IOException {
		String[] m = br.readLine().split(" ");
		String[] w = br.readLine().split(" ");
		String[] h = br.readLine().split(" ");
		double s = 0.0;
		for(int i =1;i<6;i++){
			//System.out.println(cal(500*i,Integer.parseInt(m[i-1]),Integer.parseInt(w[i-1])));
			s+=cal(500*i,Integer.parseInt(m[i-1]),Integer.parseInt(w[i-1]));
		}
		s=s+(Integer.parseInt(h[0])*100);
		s=s-(Integer.parseInt(h[1])*50);
		int ans = (int)s;
		System.out.println(ans);
		
	}
	private static double cal(int x, int m, int w) {
		// TODO Auto-generated method stub
		double t1 = 0.3*x;
		double temp = (double)(m/250.0);
		double temp2 = (double)(1.0-temp);
		double t2 = (temp2*x) -(50.0*w);
		//System.out.println(t1+" "+t2);
		return (t1>t2)?t1:t2;
	}
	

	
	

}
