

    import java.util.Scanner;
    
    public class Problem604A {
    
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            int[] arr1 = new int[5];
            int[] arr2 = new int[5];
    
            int point = 500;
            double temp = 0;
            double result = 0;
            for (int i = 0; i < arr1.length; i++) {
                arr1[i] = input.nextInt();
            }
            for (int i = 0; i < arr1.length; i++) {
                arr2[i] = input.nextInt();
            }
            int h1 = input.nextInt();
            int h2 = input.nextInt();
            // for (int i = 0; i < arr1.length; i++) {
            // arr3[i] = input.nextInt();
            // }
            for (int i = 0, j = 0; i < arr1.length; i++, j++) {
                temp = (1 - (arr1[i] * 1.0 / 250));
                result = result + Math.max(0.3*point, (temp * point - (50 * arr2[j])));
                point += 500;
            }
            int finalResult = (int) (result + (h1 * 100) - (h2 * 50));
            System.out.println(finalResult);
    
        }
    
    }
