import java.util.Scanner;
import java.util.*;

public class Solution {

	public static void main(String[] args) {
		boolean debug = false;

		Scanner input = new Scanner(System.in);

		int q = 5;

		int[] m = new int[q];
		int[] w = new int[q];

		int[] scores = new int[]{500, 1000, 1500, 2000, 2500};

		for(int i=0; i < q; i++) {
		    m[i] = input.nextInt();
        }

        for(int i=0; i < q; i++) {
		    w[i] = input.nextInt();
        }

        int hs = input.nextInt();
		int hu = input.nextInt();

		int totalScore = 0;

		for(int i=0; i < q; i++) {
            totalScore += Math.max(3 * scores[i]/10, ((250 - (m[i])) * (scores[i])/250) - 50 * w[i]);
        }

        totalScore += hs * 100;
		totalScore -= hu * 50;

		System.out.println(totalScore);
	}

}