import java.util.*;
public class Main {
    static char E[],S[];
    static int n,len=5;

    public static void main (String []args)  {
    Scanner s =new Scanner (System.in);

    int arr[]={500,1000,1500,2000,2500};
    int minute[]=new int[len],WA[]=new int [len];
    for(int i=0;i<len;i++)
        minute[i]=s.nextInt();
    for(int i=0;i<len;i++)
        WA[i]=s.nextInt();
    
    int suc=s.nextInt()*100,unsuc=s.nextInt()*50;
    double ans=0;
    for(int i=0;i<5;i++){
        ans+=Math.max(0.3*arr[i],((double)(250-minute[i])/250.0)*arr[i]-50*WA[i]);
    }
    ans+=suc;ans-=unsuc;
         System.out.println((long)ans);
  
    s.close();
    }

    }