import java.util.Scanner;

public class Main {
static Double max(Double n,Double m)
{
if(n>m)
    return n;
else 
    return m;
}
   
    
    public static void main(String[] args) {
              Scanner in=new Scanner(System.in);
              Double m[]=new Double[5];
                Double w[]=new Double[5];
              for (int i=0;i<5;i++){
                  m[i]=in.nextDouble();
              }
               for (int i=0;i<5;i++){
                  w[i]=in.nextDouble();
              }
           Double hs=in.nextDouble();
             Double hc=in.nextDouble();
          
   Double res=0.0;           
          for (int i=500;i<=2500;i=i+500){
              
             res+=max(0.3*i,(1-(m[(i/500)-1]/250))*i-(50*w[(i/500)-1])); 
              
          }    
          res+=hs*100-hc*50;
          
          System.out.println(res.intValue());

    }
}