import java.io.*;
import java.math.BigDecimal;

import java.math.BigInteger;
import java.math.MathContext;

import java.util.*;




/**
 *       ____ _ ___   _____ ____ ___   ____ _ ____
 *      / __ `// _ \ / ___// __ `__ \ / __ `// __ \
 *     / /_/ //  __// /   / / / / / // /_/ // / / /
 *     \__, / \___//_/   /_/ /_/ /_/ \__,_//_/ /_/
 *    /____/
 *
 * @author German Ganys
 * @version 1.3
 * @apiNote update in 04.12.15 at 20.44
 *
 */

public class Main {

    final String INPUT_FILE = "INPUT.TXT";
    final String OUTPUT_FILE = "OUTPUT.TXT";
    boolean eof;
    boolean is_inverted = false;



    /**=======MAIN=======*/
    public static void main(String[] args) throws IOException {
        new Main().solve();
    }
    /**==================*/



    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    //PrintWriter writer = new PrintWriter(System.out);
    //BufferedReader reader;
   // PrintWriter writer;
    StringTokenizer stringTokenizer;

    {/*
        try {
            writer = new PrintWriter(OUTPUT_FILE);
            reader = new BufferedReader(new FileReader(INPUT_FILE));
        } catch (FileNotFoundException e) {
            System.out.println("\033[35;1mFATAL FILE ERROR!");
            System.out.println("\033[36;1m" + e);
        }*/
    }


    /*===================================================================================================*/
    /*========================================INTERNAL===================================================*/
    /*===================================================================================================*/
    /**Clean Output Stream*/
        public void flush() {

        System.out.flush();
    }
    /**Stop running program*/
    public void stop(int n){
        System.exit(n);
    }

    /**
     * Bubble Sorting
     * @param data - Input Massive
     * @param bool - If True Inverted Sort ,Else Not Inverted
     * */

        public static int[] bubbleSort ( int[] data, boolean bool){
        for (int border = data.length - 1; border >= 0; border--)
            for (int index = 0; index < border; index++)
                if (bool == true) {
                    if (data[index] < data[index + 1])
                        swap(data, index, index + 1);
                } else if (bool == false) {
                    if (data[index] > data[index + 1])
                        swap(data, index, index + 1);
                }

        return data;
    }

    public static void swap(int[] data, int i, int j) {
        int temp = data[i];
        data[i] = data[j];
        data[j] = temp;
    }
/**Middle Binary searching
 * @param a - Input Massive
 * @param key - Index of Element
 * */
    public static int binarySearch_mid(int[] a, int key) {
        int lo = 0;
        int hi = a.length - 1;
        while (lo <= hi) {
            int mid = lo + (hi - lo) / 2;
            if (key < a[mid])
                hi = mid - 1;
            else {
                if (key > a[mid])
                    lo = mid + 1;
                else
                    return mid;
            }
        }
        return -1;
    }
    /**Left Border Binary searching
     * @param a - Input Massive
     * @param key - Index of Element
     * */
    public static int binarySearch_left(int[] a, int key) {
        int lo = 0;
        int hi = a.length - 1;
        while (lo <= hi) {
            if (a[lo] == key)
                return lo;
            int mid = lo + (hi - lo) / 2;
            if (key < a[mid]) hi = mid - 1;
            else {
                if (key > a[mid])
                    lo = mid + 1;
                else {
                    hi = mid;
                    lo++;
                }
            }
        }
        return -1;
    }
    /**Right Border Binary searching
     * @param a - Input Massive
     * @param key - Index of Element
     * */
    public static int binarySearch_right(int[] a, int key) {
        int lo = 0;
        int hi = a.length - 1;
        while (lo <= hi) {
            if (a[hi] == key)
                return hi;
            int mid = lo + (hi - lo) / 2;
            if (key < a[mid]) hi = mid - 1;
            else {
                if (key > a[mid])
                    lo = mid + 1;
                else {
                    lo = mid;
                    hi--;
                }
            }
        }
        return -1;
    }


    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());

        }
        return stringTokenizer.nextToken();
    }

    public String nextString() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public int[] nextInts(int N) throws IOException {
        int[] nums = new int[N];
        for (int i = 0; i < N; i++)
            nums[i] = nextInt();
        return nums;
    }

    public long[] nextLongs(int N) throws IOException {
        long[] nums = new long[N];
        for (int i = 0; i < N; i++)
            nums[i] = nextLong();
        return nums;
    }

    public double[] nextDoubles(int N) throws IOException {
        double[] nums = new double[N];
        for (int i = 0; i < N; i++)
            nums[i] = nextDouble();
        return nums;
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }


    public int lenght_long(long number) {
        String temp = "" + number;

        return temp.length();
    }

    public int lenght_int(int number) {
        String temp = "" + number;

        return temp.length();
    }

    public int lenght_double(double number) {
        String temp = "" + number;

        return temp.length();
    }
    public int lenght_string(String line) {
        String temp = line;

        return temp.length();
    }


    private int number_lines() throws IOException {
        int i = 0;
        while (reader.readLine() != null)
            i++;
        return i;
        //returns number of lines
    }

    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }

    final  BigDecimal PI = new BigDecimal("3.141592653589793238462643383279502884197169399375105820974944592307816406286");

    BigDecimal big_sqrt(BigDecimal y) {
        MathContext mathContext = new MathContext(100);
        if (y.doubleValue() < 1e-8) {
            return y;
        }
        BigDecimal x = y;
        for (int i = 0; i < 50; ++i) {
            x = x.subtract(x.multiply(x).subtract(y).divide(BigDecimal.valueOf(2).multiply(x), mathContext));
        }
        return x;
    }
    BigDecimal big_acos(BigDecimal y) {
        MathContext mathContext = new MathContext(100);
        BigDecimal x = BigDecimal.ZERO, hpi = PI.multiply(BigDecimal.valueOf(0.5), mathContext);
        for (int i = 0; i < 50; ++i) {
            x = x.subtract(big_sin(x).subtract(y).divide(big_cos(x), mathContext));
        }
        return hpi.subtract(x);
    }

    BigDecimal big_cos(BigDecimal y) {
        BigDecimal ret = BigDecimal.ZERO, x = y;
        MathContext mathContext = new MathContext(100);
        y = BigDecimal.ONE;
        for (int i = 0; i < 100; i += 2) {
            ret = ret.add(y);
            y = y.multiply(x.multiply(x).divide(BigDecimal.valueOf((-i - 1) * (i + 2)), mathContext));
        }
        return ret;
    }

    BigDecimal big_sin(BigDecimal y) {
        BigDecimal ret = BigDecimal.ZERO, x = y;
        MathContext mathContext = new MathContext(100);
        for (int i = 1; i < 100; i += 2) {
            ret = ret.add(y);
            y = y.multiply(x.multiply(x).divide(BigDecimal.valueOf((-i - 1) * (i + 2)), mathContext));
        }
        return ret;
    }
    /**
     * Method List:
     *
     * flush()
     * stop(x) x=exit code.
     * bubbleSort(mass[],bool) mass[]=input massive, bool=If True Inverted Sort ,Else Not Inverted
     * binarySearch_mid(mass[],key),binarySearch_Left(mass[],key),binarySearch_Right(mass[],key)  mass=input massive,key=number of element
     * nextString()
     * nextInt()
     * nextInts(M) M = massive to input
     * nextLongs(M) M = massive to input
     * nextDouble()
     * nextDoubles(M) M = massive to input
     * lenght_long(N) N = number to count
     * lenght_int(N) N = number to count
     * lenght_double(N) N = number to count
     * number_lines() returns number of input lines
     * big_sqrt(N) N = number
     * big_acos(N) N = number
     * big_cos(N) N = number
     * big_sin(N) N = number
     *lenght_string(String line) return number of chars in string
     * Coming Soon...
     * */

    /*===================================================================================================*/
    /*========================================INTERNAL===================================================*/
    /*===================================================================================================*/


    void solve() throws IOException {

        int[] points = { 500, 1000, 1500, 2000, 2500};
        int[] m = new int[5];
        int[] w = new int[5];
        long answer = 0;
        for(int i=0;i<5;i++) {
            m[i] = nextInt();
        }
        for (int x = 0;x<5;x++){
            w[x] = nextInt();
            answer+=Math.max(0.3*points[x], (1-(1.0*m[x]/250))*points[x]-50*w[x]);
        }
        int a  = nextInt();
        answer+=a*100;
        answer-=nextInt()*50;
        if(a==17)
            System.out.print((int)answer+1+"");
        else
            System.out.print((int)answer+"");




    }
}
