import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

 public class CODEFORCES604A {
    static class Reader
    {
    BufferedReader r;
    StringTokenizer str;
    Reader()
    {
        r=new BufferedReader(new InputStreamReader(System.in));
    }
    Reader(String fileName) throws FileNotFoundException
    {
        r=new BufferedReader(new FileReader(fileName));
    }
    public String getNextToken() throws IOException
    {
        if(str==null||!str.hasMoreTokens())
    {
        str=new StringTokenizer(r.readLine());
    }
        return str.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(getNextToken());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(getNextToken());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(getNextToken());
    }
    public String nextString() throws IOException
    {
        return getNextToken();
    }
    public int[] intArray(int n) throws IOException
    {
        int a[]=new int[n];
        for(int i=0;i<n;i++)
            a[i]=nextInt();
       
        return a;
       
    }
    public long[] longArray(int n) throws IOException
    {
        long a[]=new long[n];
        for(int i=0;i<n;i++)
            a[i]=nextLong();
       
        return a;
       
    }
    public String[] stringArray(int n) throws IOException
    {
        String a[]=new String[n];
        for(int i=0;i<n;i++)
            a[i]=nextString();
       
        return a;
       
    }
    public long gcd(long a, long b) {
        if(b == 0){
            return a;
        }
        return gcd(b, a%b);
    }
    }
   
    public static void main(String args[]) throws IOException{

       Reader r=new Reader();
       PrintWriter pr=new PrintWriter(System.out,false);

       int arr1[]=new int[5];
       int arr2[]=new int[5];
       int succ=0,unsu=0,sum=0;
       for(int a=0;a<5;a++)
       {
           arr1[a]=r.nextInt();
       }
       for(int b=0;b<5;b++)
       {
           arr2[b]=r.nextInt();
       }
       succ=100*r.nextInt();
       unsu=50*r.nextInt();
       
       for(int c=0;c<5;c++)
       {
           //pr.println((((1-(arr1[c]/250))*(500*(c+1))) - 50*arr2[c]));
           sum+=Math.max(((.3)*500*(c+1)) , (((1-((double)arr1[c]/250))*500*(c+1)) - 50*arr2[c]));
           //pr.println(sum);
       }
       pr.print(sum+succ-unsu);
       
       pr.flush();
       pr.close();
       
    }
 }
