import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> times = new ArrayList<Integer>();
        ArrayList<Integer> wrongsubms = new ArrayList<Integer>();
        int problemsScores=0;
        for (int i =0 ; i < 5; i++)
        {
            times.add(sc.nextInt());
        }
        for (int i =0 ; i < 5; i++)
        {
            wrongsubms.add(sc.nextInt());
        }
        problemsScores+=100*sc.nextInt();
        problemsScores-=50*sc.nextInt();

        for (int i =0 ; i < 5; i++)
        {
            problemsScores += problemScore(i+1,times.get(i),wrongsubms.get(i));
        }
        System.out.print(problemsScores);

    }
    public static int problemScore(int problemNumber, int problemTime, int wrongSubmissions) {
        int maxScore = 500*problemNumber;
        float calcScore = (maxScore * (1 - ((float) problemTime / 250))) - 50 * wrongSubmissions;
        int minScore = (int)(0.3*maxScore);
        return Math.max(minScore,(int)calcScore);
    }
}