import java.text.DecimalFormat;
import java.util.Scanner;

public class CowedForces {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		DecimalFormat f = new DecimalFormat("0");
		int[] times = new int[5];
		int[] wa = new int[5];
		int[] max = {500, 1000, 1500, 2000, 2500};
		for(int i = 0; i < 5; i++) times[i] = scan.nextInt();
		for(int i = 0; i < 5; i++) wa[i] = scan.nextInt();
		int goodHacks = scan.nextInt(), badHacks = scan.nextInt(), points = 0;
		for(int i = 0; i < 5; i++) {
			int temp = (int) Math.max((double)max[i]*.3, Integer.parseInt(f.format(((1-((double)times[i])/(double)250)*max[i])-(50*wa[i]))));
			points+=temp;
		}
		points += goodHacks*100;
		points -= badHacks*50;
		System.out.println(points);
		
	}

}
