import java.util.Scanner;

public class Problem604A {

    public static void main(String[] args) {
        Scanner numberInput = new Scanner(System.in);
        
        int min[] = new int[5];
        int wrong[] = new int[5];

        int successful = 0;
        int unsuccessful = 0;

        for (int i = 0; i < 5; i++) {
            min[i] = numberInput.nextInt();
        }

        for (int i = 0; i < 5; i++) {
            wrong[i] = numberInput.nextInt();
        }

        successful = numberInput.nextInt();
        unsuccessful = numberInput.nextInt();

        double calcScore[] = new double[5];

        int score = 500;

        for (int i = 0; i < 5; i++) {
            calcScore[i] = Math.ceil(Math.max((0.3 * score), (1 - (min[i] / 250)) * score - (wrong[i] * 50)));
            score += 500;
        }

        int addtiionalScore = successful * 100;
        int subtractScore = unsuccessful * 50;

        int finalScore = 0;

        for (int i = 0; i < 5; i++) {
            finalScore += calcScore[i];
        }

        finalScore = finalScore + addtiionalScore - subtractScore;

        System.out.println(finalScore);
    }

}
