//I am currently taking a class actually... Such bad student.
import java.util.*;

public class KSunHasOnion {
    public static void main(String[] args){
        Scanner f = new Scanner(System.in);
        double[] m = new double[5];
        for (int i =0 ; i < 5; i++){
            m[i] = f.nextDouble();
        }
        double[] w = new double[5];
        for (int i = 0; i < 5; i++){
            w[i] = f.nextDouble();
        }
        double s = f.nextDouble(); double u = f.nextDouble();
        double score = 0;
        score += s * 100 - u * 50;
        for (int i = 0; i < 5; i++){
            double problemScore = Math.max(0.3 * 500 * (i+1), (1- m[i] / 250) * 500 * (i+1) - 50 * w[i]);
            score += problemScore;
        }
        System.out.println((int) score);
    }
}
