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

public class A {
    
    public static double getScore(int [] m, int [] w, int hSucc, int hFail) { 
        
        int [] taskWeight = {500, 1000, 1500, 2000,2500};
        double score = 0.0;
        
        for(int i=0; i<m.length; i++) { 
            score += Math.max(0.3*taskWeight[i], (1 - m[i]/250.0) * taskWeight[i] - 50*w[i]);
        }

        score += hSucc*100;
        score -= hFail*50;

        return score;

    }

    public static void main(String [] args) throws IOException { 

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = 5;
        int [] m = new int[5];
        int [] w = new int[5];
        
        StringTokenizer tokenizer = new StringTokenizer(br.readLine());

        for(int i=0; i<N; i++) { 
            m[i] = Integer.parseInt(tokenizer.nextToken());
        }
        
        tokenizer = new StringTokenizer(br.readLine());
        
        for(int i=0; i<N; i++) { 
            w[i] = Integer.parseInt(tokenizer.nextToken());
        }

        tokenizer = new StringTokenizer(br.readLine());

        int hS = Integer.parseInt(tokenizer.nextToken());
        int hU = Integer.parseInt(tokenizer.nextToken());

        int res = (int) getScore(m,w,hS,hU);
        System.out.println(res);
    }


}
