//package A;
// In the name of Allah
// Haj_Vahid

import java.util.Scanner;

public class UncowedForces {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int[] points = {500, 1000, 1500, 2000, 2500};

        int sum = 0;
        for (int i=0; i<5; i++){
            int m = s.nextInt();
            sum += (250-m)*(points[i]/250);
        }

        for (int i=0; i<5; i++){
            int w = s.nextInt();
            sum -= (w * 50);
        }
        sum += (s.nextInt()*100);
        sum -= (s.nextInt()*50);

        System.out.println(sum);
    }
}
