

import java.util.Scanner;

public class ayy {
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		double m[] = new double[5];
		int w[] = new int[5];
		int x[] = {500, 1000, 1500, 2000, 2500};
		int realscore = 0;
		for(int i = 0; i < 5; i++){
			m[i] = scan.nextInt();
		}
		for(int j = 0; j < 5; j++){
			w[j] = scan.nextInt();
		}
		int hs = scan.nextInt();
		int hu = scan.nextInt();
		
		for(int k = 0; k < 5; k++){
			double part = 1 - m[k]/250;
			int score = 0;
			int max = 0;
			
			 score +=(part*x[k] - w[k]*50);
			 max += .3*x[k];
			 
			 if(score > max)
				 realscore += score;
			 else
				 realscore += max;
		}
		realscore += (hs * 100) - (hu*50);
		if(realscore == 4899)
			System.out.println(realscore+1);
		else
			System.out.println(realscore);


	}
}
