import java.util.Scanner;
public class Uncowed_Forces {
    public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        double total=0;
        double m[] = new double[5],x=500,w;
        for(int i=0;i<5;i++){
            m[i]=sc.nextInt();            
        }
        for(int i=0;i<5;i++){
            w = sc.nextInt();
            double s1,s2;

            s1 = (0.3*x);
            s2 = ((1-(double)m[i]/(double)250)*x-50*w);
            x+=500;
            if(s1>s2)
                total+=s1;
            else
                total+=s2;
        }
        total+=sc.nextInt()*100;
        total-=sc.nextInt()*50;
        System.out.println((int)total);
    }
}
