/*
 * 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.
 */
import java.util.*;
import java.math.*;
import java.io.*;

/**
 *
 * @author magzhankairanbay
 */
public class Code {
    
    public static boolean[] used;
    
    public static int binSearch(int[] a, int x, int h, int l, int n) {
        
        int m = (h + l) / 2;
        used = new boolean[n];
        used[m] = true;
//        System.out.println("element = " + x);
        while (l <= h) {
//            System.out.println("m = " + m + " h = " + h + " l = " + l);
            if (a[m] < x) {
                l = m + 1;
            } else if (a[m] == x) {
                int c = 0;
                
                for (int i = m + 1; i < n; i++) {
                    if (a[i] == x) {
                        c++;
                    } else {
                        break;
                    }
                }
                return m + c + 1;
            } else {
                h = m - 1;
            }
            
//            System.out.println("M = " + m + " H = " + h + " L = " + l);
            if (a[l] > x) {
                return l;
            }
            if (a[l] >= x) {
                int c = 0;
                for (int i = l + 1; i <= n; i++) {
                    if (a[i] == x) {
                        c++;
                    } else {
                        break;
                    }
                }
                return l + c + 1;
            }
            if (a[h] < x) {
                
                return h + 1;
            }
            if (a[h] <= x) {
                int c = 0;
                for (int i = h + 1; i < n; i++) {
                    if (a[i] == x) {
                        c++;
                    } else {
                        break;
                    }
                }
                return h + c + 1;
            }
            m = (h + l) / 2;
        }
        
        if (l > h) {
            return -1;
        }
        
        return 0;
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try {
        
            Scanner in = new Scanner(System.in);
            
            double[][] m = new double[5][2];
            
            for (int i = 0; i < 5; i++) {
                m[i][0] = in.nextInt();
                m[i][1] = 500 * (i + 1);
            }
            
            double[] w = new double[5];
            
            for (int i = 0; i < 5; i++) {
                w[i] = in.nextInt();
            }
            
            int s = in.nextInt();
            int u = in.nextInt();
            
            double[] a = new double[5];
            double sum = s * 100.0 + u * 50.0;
            
            for (int i = 0; i < 5; i++) {
                if (175 * m[i][1] > 12500 * w[i] + m[i][0] * m[i][1]) {
                    a[i] = (1.0 - (m[i][0] / 250.0)) * m[i][1] - 50.0 * w[i];
                } else {
                    a[i] = 0.3 * m[i][1];
                }
//                System.out.println(a[i]);
                sum += a[i];
            }
            
            System.out.println((int) sum);
            
        } catch(Exception ex) {
        
            System.out.println(ex.toString());
        }
    }
    
}