import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	static int m1, m2, m3, m4, m5, w1, w2, w3, w4, w5, h1, h2;
	static int end;
	
	public static void main(String[] args) {
		m1 = sc.nextInt();
		m2 = sc.nextInt();
		m3 = sc.nextInt();
		m4 = sc.nextInt();
		m5 = sc.nextInt();
		
		w1 = sc.nextInt();
		w2 = sc.nextInt();
		w3 = sc.nextInt();
		w4 = sc.nextInt();
		w5 = sc.nextInt();
		
		h1 = sc.nextInt();
		h2 = sc.nextInt();
		
		end = (int) Math.max(0.3 * 500, Math.round((1 - m1/250.0)*500 - 50*w1));
		end += (int) Math.max(0.3 * 1000, Math.round((1 - m2/250.0)*1000 - 50*w2));
		end += (int) Math.max(0.3 * 1500, Math.round((1 - m3/250.0)*1500 - 50*w3));
		end += (int) Math.max(0.3 * 2000, Math.round((1 - m4/250.0)*2000 - 50*w4));
		end += (int) Math.max(0.3 * 2500, Math.round((1 - m5/250.0)*2500 - 50*w5));
		
		for (int i = 0; i != h1; i++) end += 100;
		for (int i = 0; i != h2; i++) end -= 50;
		
		if (end < 0) end = 0;
		
		System.out.println(end);
	}
}
