//package okey;

import java.util.Scanner;

public class force334A {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		double []w = new double [6];
		double []m = new double [6];
		double sum = 0;
		for(int i = 1;i<=5;i++){
			m[i] = scan.nextInt();
		}
		for(int i = 1;i<=5;i++){
			w[i] = scan.nextInt();
			double x = i*500;
			sum += Math.max(0.3*x, (1-m[i]/250)*x-50*w[i]);
		}
		int hs =scan.nextInt();
		int hu = scan.nextInt();
		sum += hs*100;
		sum -= hu*50;
		System.out.println((int) sum);
	}
}
