//package Codeforces.Div2A_334.Code1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * some cheeky quote
 */

public class Main
{
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException
    {
        int scores[] = new int[]{500, 1000, 1500, 2000, 2500};
        int min[] = new int[5];
        int submissions[] = new int[5];
        double score = 0;
        for (int i = 0; i < min.length; i++)
        {
            min[i] = in.nextInt();
        }
        for (int i = 0; i < submissions.length; i++)
        {
            submissions[i] = in.nextInt();
            score += Math.max(0.3 * scores[i], (scores[i] - (min[i] * scores[i] / 250)) - (50 * submissions[i]));
        }
        int pass = in.nextInt() * 100;
        int fail = in.nextInt() * 50;
        System.out.println((int) (score + pass - fail));
    }

    public void run()
    {
        try
        {
            in = new FastScanner();
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        FastScanner()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreTokens())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

    public static void main(String[] arg)
    {
        new Main().run();
    }
}

