import java.util.*;

public class helloWorld 
{
	public static void main(String[] args) 
	{		
		Scanner in = new Scanner(System.in);
		int[][] ar = new int[5][2];
		int ans = 0;
		
		for(int j = 0; j < 2; j++)
			for(int i = 0; i < 5; i++)
				ar[i][j] = in.nextInt();
		ans += in.nextInt() * 100;
		ans -= in.nextInt() * 50;
		
		for(int i = 0, x = 500;  i < 5; i++, x += 500)
			ans += Math.max(x*3/10, x - x * ar[i][0] / 250 - 50 * ar[i][1]);
		
		System.out.println(ans);
		
		in.close();
	}
}
