import java.util.Scanner;

public class A604 {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int[] x = {500, 1000, 1500, 2000, 2500};
		int[] m = {input.nextInt(), input.nextInt(), input.nextInt(), input.nextInt(), input.nextInt()};
		int[] w = {input.nextInt(), input.nextInt(), input.nextInt(), input.nextInt(), input.nextInt()};
		int hs = input.nextInt();
		int hu = input.nextInt();
		
		int sum = 100 * hs - 50 * hu;
		for(int i = 0; i < 5; i++){
			sum += Math.max(3 * x[i] / 10, x[i] - m[i] * x[i] / 250 - 50 * w[i]);
		}
		System.out.println(sum);
	}

}