import java.util.Scanner;

public class JavaApplication233 {

    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int m1=sc.nextInt();int m2=sc.nextInt();int m3=sc.nextInt();int m4=sc.nextInt();int m5=sc.nextInt();
        int w1=sc.nextInt();int w2=sc.nextInt();int w3=sc.nextInt();int w4=sc.nextInt();int w5=sc.nextInt();
        int hs=sc.nextInt();int hu=sc.nextInt();
        double a1=.3*500;double a2=.3*1000;double a3=.3*1500;double a4=.3*2000;double a5=.3*2500;
        double b1=(1-(m1/(double)250))*500-(50*w1);double b2=(1-(m2/(double)250))*1000-(50*w2);double b3=(1-(m3/(double)250))*1500-(50*w3);double b4=(1-(m4/(double)250))*2000-(50*w4);double b5=(1-(m5/(double)250))*2500-(50*w5);
        double c1=Math.max(a1, b1);double c2=Math.max(a2, b2);double c3=Math.max(a3, b3);double c4=Math.max(a4, b4);double c5=Math.max(a5, b5);
        int d=hs*100;int e=hu*50;
        int f= ((int) (c1+c2+c3+c4+c5))+d-e;
        System.out.println(f);
    }
    
}
