import java.io.*;
import java.util.*;
public class Task1 
{
	public static Scanner in=new Scanner(System.in);
	public static BufferedWriter wr=new BufferedWriter(new OutputStreamWriter(System.out));
	public static PrintStream out=new PrintStream(System.out);
	public static void main(String[] args){
		final int a=500,b=1000,c=1500,d=2000,e=2500;
		double m1=in.nextInt(),m2=in.nextInt(),m3=in.nextInt(),m4=in.nextInt(),m5=in.nextInt();
		double w1=in.nextInt(),w2=in.nextInt(),w3=in.nextInt(),w4=in.nextInt(),w5=in.nextInt();
		int hs=in.nextInt(),hu=in.nextInt();
		double ans1=(hs*100)-(hu)*50;
		double a1=Math.max(0.3*a,(1-m1/250)*a-50*w1);
		double a2=Math.max(0.3*b,(1-m2/250)*b-50*w2);
		double a3=Math.max(0.3*c,(1-m3/250)*c-50*w3);
		double a4=Math.max(0.3*d,(1-m4/250)*d-50*w4);
		double a5=Math.max(0.3*e,(1-m5/250)*e-50*w5);
		int fin=(int) ((int)a1+a2+a3+a4+a5+ans1);
		out.println(fin);
		
		
	}
	

}
