import java.util.*;
public class JavaApplication55 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
 float arr[]=new float [5];float arr2[]=new float [5];
 
 
 for(int i=0;i<arr.length;i++)
     arr[i]=in.nextInt();
 for(int i=0;i<arr2.length;i++)
     arr2[i]=in.nextInt();

 
 int n=in.nextInt();
 int y=in.nextInt();
float max=0;float x=500;
 for(int i=0;i<arr.length;i++){
max+=Math.max(0.3*x,(1-arr[i]/250)*x);
max-=50*arr2[i];
   
     x+=500;
     
 }
 max+=n*100;
 max-=y*50;
 int m=(int)max;
        System.out.println(m);

    }
    
}