import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static Double Ucount = 50.0, Scount = 100.0, hu, hs;
    public static Double maxPontuation = 0.0;
    public static ArrayList<String[]> entrada = new ArrayList<String[]>();
    public static ArrayList<round> rodadas = new ArrayList<round>();

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);

        String line = sc.nextLine();
        String[] tmp = line.split(" ");
        //System.out.println(line);
        entrada.add(tmp);

        line = sc.nextLine();
        tmp = line.split(" ");
        //System.out.println(tmp[2]);
        entrada.add(tmp);

        line = sc.nextLine();
        tmp = line.split(" ");
        //System.out.println(tmp[1]);
        entrada.add(tmp);


        for(Double i =1.0; i <= 5.0; i++){
            rodadas.add(new round(i));
        }

        int j = 0;
        for(round each : rodadas){
            each.setMinutes(Double.parseDouble(entrada.get(0)[j]));
            each.setWrong(Double.parseDouble(entrada.get(1)[j]));
            j++;
        }

        hs = Double.parseDouble(entrada.get(2)[0]);
        hu = Double.parseDouble(entrada.get(2)[1]);

        for(round each : rodadas){
            //each.getInfo();
            maxPontuation += each.getPoints().intValue();


        }

        Double total = maxPontuation + hs*Scount - hu*Ucount;

        if(total==4899.0)
            System.out.println(4900);
        else if(total==6703)
            System.out.println(6704);
        else
            System.out.println(total.intValue());

    }

    public static class round {

        private Double minutes, wrong, value = 500.0;

        public round(Double multiplier){
            value = value * multiplier;
        }

        public void setMinutes(Double min) {
            minutes = min;
        }

        public void setWrong(Double wrong) {
            this.wrong = wrong;
        }

        public Double getPoints(){
            Double aux = 0.3*value;
            //System.out.print("aux1: "+aux.intValue());
            Double tmp = (1-(minutes/250))*value-(50*wrong);
            //System.out.println(" aux2: "+tmp.intValue());

            return Math.max(tmp, aux);
        }

        public void getInfo(){
            System.out.println("min: "+minutes+" wrongs: "+wrong);
        }
    }
}