import java.util.Scanner;

public class A3 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double score=0;
		double m[]=new double[5];
		double w[]=new double[5];
		for(int i=0;i<5;i++)
			m[i]=in.nextInt();

		for(int i=0;i<5;i++)
			w[i]=in.nextInt();
		int sh=in.nextInt();
		int uh=in.nextInt();
		score+=100*sh;
		score+=-50*uh;
		int x=500;
		for(int i=0;i<5;i++){
			double pp=(double)m[i]/(double)250;
			double s=Math.max(0.3*x,(((1-m[i]/250)*x)-50*w[i])) ;
			//System.out.println(s);
			x+=500;
			score+=s;
		}
		System.out.println((int)score);
	}

}
