
import java.util.Arrays;
import java.util.Scanner;

/**
 * Created by adam- on 12/11/2016.
 */
public class Main {

    public static void main ( String []args ) {

        int R = 0;

        Scanner S = new Scanner(System.in);

        double M [][] = { {500.0, 1000.0, 1500.0, 2000.0, 2500.0 },
                {S.nextInt(), S.nextInt(), S.nextInt(), S.nextInt(),S.nextInt(),},
                {S.nextInt(), S.nextInt(), S.nextInt(), S.nextInt(),S.nextInt(),} };

        R+= S.nextInt()*100 - S.nextInt()*(-50) ;

        for ( int  i = 0 ; i < 5  ; i++ ) {
            double x = (( 1 - (M[1][i]/250d))*M[0][i] - 50*M[2][i]);
            R += Math.max( 0.3d*M[0][i] ,x);
        }

        System.out.println(R);

    }

}
