import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class CF334A {
    public static void main(String[] args) throws IOException{
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringTokenizer st1 = new StringTokenizer(bf.readLine());

        int[] time= new int[5];
        int[] wa = new int[5];
        double score = 0;
        
        for (int i = 0; i < 5; i++){
            time[i] = Integer.parseInt(st.nextToken());
            wa[i] = Integer.parseInt(st1.nextToken());
            score += calculatescore(time[i], 500*(i+1), wa[i]);
        }
        
         st = new StringTokenizer(bf.readLine());
        int right = Integer.parseInt(st.nextToken());
        int wrong = Integer.parseInt(st.nextToken());
        
        score+= 100*right - 50 * wrong;
        System.out.println((int)score);
    }
    
    public static double calculatescore(int time, int amount, int wrongsubmissions){
        return Math.max((double).3*amount, (1-(double)time/250)*amount - 50*wrongsubmissions);
    }
}
