import java.util.*;
public class uncowedforces
{
    public static void main(String args[])
    {
        Scanner in=new Scanner(System.in);
        int a[]={500,1000,1500,2000,2500};
        int m[]=new int[5];
        int w[]=new int[5];
        int s=0,i,x,y;double y1,y2,y3;
        for(i=0;i<5;i++)
            m[i]=in.nextInt();
        for(i=0;i<5;i++)
            w[i]=in.nextInt();
        int hs=in.nextInt();
        int hu=in.nextInt();
        for(i=0;i<5;i++)
        {
            x=(int)(0.3*a[i]);
            y1=m[i]/250.0;
            y2=1.0-y1;
            y3=y2*a[i];
            y=(int)Math.ceil(y3)-50*w[i];
            //System.out.println(x+" "+y1+" "+y2+" "+y3+" "+y);
            s=s+(int)Math.max(x,y);
            //System.out.println(s);
        }
        s=s+100*hs-50*hu;
        System.out.println(s);
    }
}