import java.util.*;
public class uncowed {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] m=new int[5];
		int[] w=new int[5];
		int[] p=new int[] {500,1000,1500,2000,2500};
		int s; int u;
		int score=0;
		for (int i=0; i<5; i++) {
			m[i]=sc.nextInt();
		}
		sc.nextLine();
		for (int i=0; i<5; i++) {
			w[i]=sc.nextInt();
		}
		sc.nextLine();
		s=sc.nextInt();
		u=sc.nextInt();
		for (int i=0; i<5; i++) {
			score+=max(300*p[i],(1000-4*m[i])*p[i]-50000*w[i]);
		}
		score+=s*100000;
		score-=u*50000;
		System.out.println(score/1000);
	}
	
	public static int max(int a, int b) {
		if (a>b) return a;
		else return b;
	}

}
