/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package kevinhacks;

import java.util.Scanner;

/**
 *
 * @author baobab
 */
public class KevinHacks {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int[] x = new int[6];
        x[1] =  500;
        x[2] = 1000;
        x[3] = 1500;
        x[4] = 2000;
        x[5] = 2500;
        int[] m = new int[6];
        for (int i=1; i<=5; i++) {
            m[i] = s.nextInt();
        }
        int[] w = new int[6];
        for (int i=1; i<=5; i++) {
            w[i] = s.nextInt();
        }
        int succHacks = s.nextInt();
        int failHacks = s.nextInt();
        
        long total = succHacks * 100 - failHacks * 50;
        for (int i=1; i<=5; i++) {
            long a = Math.round(0.3*x[i]);
            long b = x[i] - 50*w[i] - m[i] * Math.round(x[i] / 250);
            total += Math.max(a, b);
        }
        System.out.println(total);
    }
    
}
