import java.util.Scanner;

public class Mighty{
   public static void main(String[] args){
     Scanner GetInput= new Scanner(System.in);
     int[] Time=new int[5];
     for(int i=0;i<5;i++){
        Time[i]=GetInput.nextInt();        
     }
     int[] WA=new int[5];
     for(int i=0;i<5;i++){
        WA[i]=GetInput.nextInt();
        
     }
     double score=0;
     double sumscore=0;
     for(int i=500;i<=2500;i=i+500){
       int ComputeI=(i/500)-1;
       double compute=(250-Time[ComputeI]);
       double x=compute/250;
       score=Math.max(0.3*i,(x*i)-50*WA[ComputeI]);
       sumscore=sumscore+score;



     }
     int hackScore=GetInput.nextInt()*100;
     int UhackScore=GetInput.nextInt()*50;
    
    System.out.println((int)sumscore+hackScore-UhackScore);

  }
}