import java.util.*;
public class Main {
    public static void main(String[] args) {        
 
        int ans=0,w,hs,hw;
        int cost[]= {500, 1000, 1500, 2000, 2500};
        int in[]= new int[10];
        
        Scanner sc= new Scanner (System.in);
        for(int i=0;i<5;i++)
            in[i]= sc.nextInt();
        
        for(int i=0;i<5;i++){
            w= sc.nextInt();
            ans+=Math.max(0.3*cost[i], (((250*cost[i])-(in[i]*cost[i]))/250)-(50*w));
        }
        hs= sc.nextInt();
        hw= sc.nextInt();
        
        ans+= (100*hs);
        ans-= (50*hw);
        
        System.out.println(""+ans);
    }
}
