
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
         int m1 = scan.nextInt();
         int m2 = scan.nextInt();
         int m3 = scan.nextInt();
         int m4 = scan.nextInt();
         int m5 = scan.nextInt();
         int w1 = scan.nextInt();
         int w2 = scan.nextInt();
         int w3 = scan.nextInt();
         int w4 = scan.nextInt();
         int w5 = scan.nextInt();
         int h1 = scan.nextInt();
         int h2 = scan.nextInt();
         long ans = 0;
         ans +=Math.max(0.3 * 500, (1 - (1.0 * m1/250)) * 500 - 50*w1);
         ans +=Math.max(0.3 * 1000, (1 - (1.0 * m2/250)) * 1000 - 50*w2);
         ans +=Math.max(0.3 * 1500, (1 - (1.0 * m3/250)) * 1500 - 50*w3);
         ans +=Math.max(0.3 * 2000, (1 - (1.0 * m4/250)) * 2000 - 50*w4);
         ans +=Math.max(0.3 * 2500, (1 - (1.0 * m5/250)) * 2500 - 50*w5);
         ans += h1 * 100;
         ans -= h2 * 50;
         System.out.println(ans);
    }

    
}

