
import java.util.Scanner;

public class Main {
	public static double max(double x,double y){
		return x>y?x:y;
	}
	public static void main(String [] args){
		Scanner sc = new Scanner(System.in);
		double[] m = new double[5];
		double[] w = new double[5];
		for(int i=0;i<5;i++){
			m[i] = sc.nextDouble();
		}
		for(int i=0;i<5;i++){
			w[i] = sc.nextDouble();
		}
		double hs = sc.nextDouble();
		double hu = sc.nextDouble();
		double sum = 0;
		double x = 500;
		for(int i=0;i<5;i++){
			sum += max(0.3*x , ((1 - (m[i]/250)) *x) - (50*w[i])   );
			x += 500;
		}
		sum += (hs*100);
		sum -= (hu*50);
		System.out.println((int)sum);
	}
}
