import java.util.*;

public class uncowedForces {

	
	public static void main(String[] args)
	{
		//equation max(0.3x, (1-m/250)x - 50w)
		//multiply equation by 250, new equation:  max(75x, (250-m)x - 12500)
		
		int[] pointValues = {500,1000,1500,2000,2500};  //point values for each problem (x)
		int[] time = new int[5];  //minute problem i was completed  (m)
		int[] wrong = new int[5];  //#of wrong submissions for each problem i  (w)
		int[] hacks = new int[2];  //# of successful/unsuccessful hacks
		
		int total = 0; //total point value to return
		int firstEq, secondEq;  
		
		Scanner scan = new Scanner(System.in);
 
		
		
		for(int i = 0; i < 5; i++)
			time[i] = scan.nextInt();
		for(int i = 0; i < 5; i++)
			wrong[i] = scan.nextInt();
        for(int i = 0; i < 2; i++)
        	hacks[i] = scan.nextInt();
		
		
		for(int i = 0; i < 5; i++)
		{
			firstEq = pointValues[i] * 75;
			secondEq = (250-time[i])*pointValues[i] - 12500;
			
			if(firstEq > secondEq)
				total += firstEq;
			else
				total += secondEq;	
		}
		total = total / 250;
		
		total += hacks[0];
		total += hacks[1];
		
		
		
		System.out.println(total);
		
		scan.close();
		
	}
}
