import java.util.*;
public class UncowedForces {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double score=0;
		int[] a = new int[5];
		int[] b = new int[5];
		for(int i=0;i<5;i++) {
			a[i]=in.nextInt();
		}
		for(int i=0;i<5;i++) {
			b[i] = in.nextInt();
		}
		score+= in.nextInt()*100;
		score-= in.nextInt()*50;
		for(int i=0;i<5;i++) {
			score+=Math.max(.3*((1+i)*500), (1-a[i]/250.0)*((i+1)*500)-50*b[i]);
		}
		System.out.println((int)score);
	}
}
