import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


	
public class Problem604A {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		float t1 = Integer.parseInt(st.nextToken());
		float t2 = Integer.parseInt(st.nextToken());
		float t3 = Integer.parseInt(st.nextToken());
		float t4 = Integer.parseInt(st.nextToken());
		float t5 = Integer.parseInt(st.nextToken());
		
		st = new StringTokenizer(br.readLine());
		int w1 = Integer.parseInt(st.nextToken());
		int w2 = Integer.parseInt(st.nextToken());
		int w3 = Integer.parseInt(st.nextToken());
		int w4 = Integer.parseInt(st.nextToken());
		int w5 = Integer.parseInt(st.nextToken());
		
		st = new StringTokenizer(br.readLine());
		int sHacks = Integer.parseInt(st.nextToken());
		int uHacks = Integer.parseInt(st.nextToken());
		
		int proScores = (int) (Math.max(150, ((1-t1/250)*500-50*w1))+Math.max(0.3*1000, ((1-t2/250)*1000-50*w2))+ Math.max(0.3*1500, ((1-t3/250)*1500-50*w3))
		+ Math.max(0.3*2000, ((1-t4/250)*2000-50*w4))+ Math.max(0.3*2500, ((1-t5/250)*2500-50*w5)));
		
				
		int score = proScores + 100*sHacks - 50*uHacks;
		System.out.println(score);
	}

}
