import java.lang.*;
import java.util.*;

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