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


public class B {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static double m[] = new double[5];
	static double w[] = new double[5];
	static StringTokenizer st;
	public static void main(String[]args)throws Throwable{
		st = new StringTokenizer(br.readLine());
		for(int i=0;i<5;i++){
			m[i] = Double.parseDouble(st.nextToken());
		}
		st = new StringTokenizer(br.readLine());
		for(int i=0;i<5;i++){
			w[i] = Double.parseDouble(st.nextToken());

		}
		double x = 0;
		double score = 0;
		for(int i=0;i<5;i++){
			
			x+=500;
			double f = (int)(x*0.3);
			double f2 = ((1-m[i]/250)*x)-(50*w[i]);
			//System.out.println(f+ " "+f2);
			
			score += Math.max(f,f2);
		}
		//System.out.println(score);
		st = new StringTokenizer(br.readLine());
		double a = Double.parseDouble(st.nextToken());
		double b= Double.parseDouble(st.nextToken());
		a*=100;
		b*=50;
		score+=a;
		score-=b;
		System.out.println((int)score);
	}
}
