import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;

	 public class Palindrome {

		static double eps=(double)1e-6;
		static long mod=(int)1e9+7;
		public static void main(String args[]){
			InputReader in = new InputReader(System.in);
			OutputStream outputStream = System.out;
			PrintWriter out = new PrintWriter(outputStream);
			//----------My Code----------
			int m[]=new int[5];
			int w[]=new int[5];
			for(int i=0;i<5;i++)
				m[i]=in.nextInt();
			for(int i=0;i<5;i++)
				w[i]=in.nextInt();
			int hs=in.nextInt();
			int hw=in.nextInt();
			float total=0;
			int base=500;
			for(int i=0;i<5;i++){
				float h=(1-(float)m[i]/250)*(base*(i+1))-50*w[i];
				float x=(float)0.3*base*(i+1);
				total+=Math.max(h, x);
			}
			total+=(float)(hs)*100-hw*50;
			System.out.println((int)total);

			//---------------The End------------------
			out.close();
		}

			static class TrieNode{
				boolean isLeaf;
				int b;
				TrieNode[] a=new TrieNode[256];
			}

			static void insert(String key,TrieNode root){
				TrieNode temp=root;
				for(int i=0;i<key.length();i++){
				//	System.out.println(i);

					if(temp.a[key.charAt(i)]==null){
						temp.a[key.charAt(i)]=new TrieNode();
					}
					temp.a[key.charAt(i)].b+=1;
					temp=temp.a[key.charAt(i)];

				}
				temp.isLeaf=true;
			}
			static TrieNode search(String key,TrieNode root){
				TrieNode temp=root;
				for(int i=0;i<key.length();i++){

					if(temp.a[key.charAt(i)]==null)
						return null;
					temp=temp.a[key.charAt(i)];

				}
				return (temp);
			}
			static String max(String key,TrieNode root){
				TrieNode temp=root;
				String res="";
				for(int i=0;i<key.length();i++){

					if(temp.a[(key.charAt(i)-'0')^1]!=null){
					//	System.out.println("Hetr");
					temp=temp.a[(key.charAt(i)-'0')^1];
					res+="1";
					}
					else if(temp.a[(key.charAt(i)-'0')]!=null){
						//System.out.println("Hetr");
						temp=temp.a[(key.charAt(i)-'0')];
						res+="0";
					}
				}
			//	System.out.println(res+"jj");
				return res;
			}
			static void remove(String key,TrieNode root){
				TrieNode temp=root;
				for(int i=0;i<key.length();i++){
					if(temp==null)
						return;
				  if(temp.a[(key.charAt(i)-'0')]!=null&&temp.a[key.charAt(i)-'0'].b>1){

						temp.a[(key.charAt(i)-'0')].b--;

					temp=temp.a[(key.charAt(i)-'0')];
				}
				else
				{
					temp.a[key.charAt(i)-'0']=null;
					return;
				}
				}
				if(temp!=null)
					temp.isLeaf=false;
			}

			public static void printSorted(TrieNode node, String s) {
		        for (int ch = 0; ch < node.a.length; ch++) {
		            TrieNode child = node.a[ch];
		            if (child != null){
		                printSorted(child, s + (char)(ch));
		            }
		        }
		        if (node.isLeaf) {
		            System.out.println(s);
		        }
		    }
		private static void permutation(String prefix, String str,HashSet<String> hs) {
		    int n = str.length();
		    if (n == 0) hs.add(prefix);
		    else {
		        for (int i = 0; i < n; i++)
		            permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n),hs);
		    }
		}
		static int[][] floydWarshall(int graph[][],int V)
	    {
	        int dist[][] = new int[V][V];
	        int i, j, k;

	        /* Initialize the solution matrix same as input graph matrix.
	           Or we can say the initial values of shortest distances
	           are based on shortest paths considering no intermediate
	           vertex. */
	        for (i = 0; i < V; i++)
	            for (j = 0; j < V; j++)
	                dist[i][j] = graph[i][j];

	        /* Add all vertices one by one to the set of intermediate
	           vertices.
	          ---> Before start of a iteration, we have shortest
	               distances between all pairs of vertices such that
	               the shortest distances consider only the vertices in
	               set {0, 1, 2, .. k-1} as intermediate vertices.
	          ----> After the end of a iteration, vertex no. k is added
	                to the set of intermediate vertices and the set
	                becomes {0, 1, 2, .. k} */
	        for (k = 0; k < V; k++)
	        {
	            // Pick all vertices as source one by one
	            for (i = 0; i < V; i++)
	            {
	                // Pick all vertices as destination for the
	                // above picked source
	                for (j = 0; j < V; j++)
	                {
	                    // If vertex k is on the shortest path from
	                    // i to j, then update the value of dist[i][j]
	                    if (dist[i][k] + dist[k][j] < dist[i][j])
	                        dist[i][j] = dist[i][k] + dist[k][j];
	                }
	            }
	        }
	return dist;
	    }
		static int recursiveBinarySearch(int[] sortedArray, int start, int end, int key) {

			if (start <= end) {
				int mid = start + (end - start) / 2;
				if (key < sortedArray[mid]) {
					return recursiveBinarySearch(sortedArray, start, mid-1, key);

				} else if (key > sortedArray[mid]) {
					return recursiveBinarySearch(sortedArray, mid+1, end , key);

				} else {
					return mid;
				}
			}
			return -(start + 1);
		}

		static long modulo(long a,long b,long c) {
			long x=1;
			long y=a;
			while(b > 0){
				if(b%2 == 1){
					x=(x*y)%c;
				}

				y = (y*y)%c; // squaring the base
				b /= 2;
			}
			return  x%c;
		}

		static long gcd(long x, long y)

		{
			long r=0, a, b;
			a = (x > y) ? x : y; // a is greater number
			b = (x < y) ? x : y; // b is smaller number
			r = b;
			while(a % b != 0)
			{
				r = a % b;
				a = b;
				b = r;
			}
			return r;
		}
		static class pair implements Comparable<pair> {
			int x;
			int y;
			//int i;
			pair(int  xx,int yy){

				x=xx;
				y=yy;
				//i=ii;
			}
			@Override
			public int compareTo(pair arg0) {
				return Long.compare(this.y, arg0.y);
			}

		}
		static class InputReader {
			public BufferedReader reader;
			public StringTokenizer tokenizer;

			public InputReader(InputStream inputstream) {
				reader = new BufferedReader(new InputStreamReader(inputstream));
				tokenizer = null;
			}

			public String nextLine(){
				String fullLine=null;
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					try {
						fullLine=reader.readLine();
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
					return fullLine;
				}
				return fullLine;
			}
			public String next() {
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					try {
						tokenizer = new StringTokenizer(reader.readLine());
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
				}
				return tokenizer.nextToken();
			}
			public long nextLong() {
				return Long.parseLong(next());
			}
			public int nextInt() {
				return Integer.parseInt(next());
			}
		}
	}


import java.io.*;
import java.util.*;

public class A {
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		int[] maxScore = { 500, 1000, 1500, 2000, 2500 };
		int[] submissionTime = new int[5];
		int[] wrongSubmission = new int[5];
		for (int i = 0; i < 5; i++) {
			submissionTime[i] = sc.nextInt();
		}
		for (int i = 0; i < 5; i++) {
			wrongSubmission[i] = sc.nextInt();
		}
		int suc = sc.nextInt();
		int err = sc.nextInt();
		double score = 0;
		for (int i = 0; i < 5; i++) {
			double o1 = maxScore[i] * 0.3;
			double tmp = submissionTime[i] / 250.0;
			double o2 = (1 - tmp) * maxScore[i] - (50 * wrongSubmission[i]);
			score += Math.max(o1, o2);
		}

		score += suc * 100;
		score -= err * 50;
		System.out.println((int) score);

	}

	// -----------MyScanner class for faster input thx Flatfoot----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			this.br = new BufferedReader(new InputStreamReader(System.in));
		}

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

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

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

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

		String nextLine() {
			String str = "";
			try {
				str = this.br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------
}


import java.io.*;
import java.util.*;

public class A {
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		int[] maxScore = { 500, 1000, 1500, 2000, 2500 };
		int[] submissionTime = new int[5];
		int[] wrongSubmission = new int[5];
		for (int i = 0; i < 5; i++) {
			submissionTime[i] = sc.nextInt();
		}
		for (int i = 0; i < 5; i++) {
			wrongSubmission[i] = sc.nextInt();
		}
		int suc = sc.nextInt();
		int err = sc.nextInt();
		int score = 0;
		for (int i = 0; i < 5; i++) {
			int o1 = maxScore[i] / 3;
			double tmp = submissionTime[i] / 250.0;
			double o2 = (1 - tmp) * maxScore[i] - (50 * wrongSubmission[i]);
			score += Math.max(o1, o2);
		}

		score += suc * 100;
		score -= err * 50;
		System.out.println(score);

	}

	// -----------MyScanner class for faster input thx Flatfoot----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			this.br = new BufferedReader(new InputStreamReader(System.in));
		}

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

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

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

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

		String nextLine() {
			String str = "";
			try {
				str = this.br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------
}


import java.io.*;
import java.util.*;

public class A {
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		int[] maxScore = { 500, 1000, 1500, 2000, 2500 };
		int[] submissionTime = new int[5];
		int[] wrongSubmission = new int[5];
		for (int i = 0; i < 5; i++) {
			submissionTime[i] = sc.nextInt();
		}
		for (int i = 0; i < 5; i++) {
			wrongSubmission[i] = sc.nextInt();
		}
		int suc = sc.nextInt();
		int err = sc.nextInt();
		int score = 0;
		for (int i = 0; i < 5; i++) {
			double o1 = maxScore[i] * 0.3;
			double tmp = submissionTime[i] / 250.0;
			double o2 = (1 - tmp) * maxScore[i] - (50 * wrongSubmission[i]);
			score += Math.max(o1, o2);
		}

		score += suc * 100;
		score -= err * 50;
		System.out.println(score);

	}

	// -----------MyScanner class for faster input thx Flatfoot----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			this.br = new BufferedReader(new InputStreamReader(System.in));
		}

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

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

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

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

		String nextLine() {
			String str = "";
			try {
				str = this.br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------
}


import java.util.Arrays;
import java.util.Scanner;

public class mainClass {
	public static void main(String[] args) {
		Scanner inn = new Scanner(System.in);
		int n = inn.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = inn.nextInt();
		}
		int max = 1;
		int curr = 1;
		for (int i = 1; i < n; i++){
			if(arr[i] < arr[i - 1]) {
				if (max < curr) max = curr;
				curr = 1;
			} else curr++;
		}
		max = Math.max(max, curr);
		System.out.println(max);
	}
}


import java.util.Scanner;

public class mainClass {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int[] m = new int[5];
		int[] w = new int[5];
		int[] x = new int[]{500, 1000, 1500, 2000, 2500};
		for (int i = 0; i < 5; i++) {
			m[i] = in.nextInt();
		}
		for (int i = 0; i < 5; i++) {
			w[i] = in.nextInt();
		}
		int hs = in.nextInt();
		int hu = in.nextInt();
		int[] ans = new int[5];
		int sum = 0;
		for (int i = 0; i < 5; i++) {
			ans[i] = Math.max(x[i] * 3 / 10, x[i] - x[i] * m[i] / 250 - 50 * w[i]);
			sum += ans[i];
		}
		sum = Math.max(0, sum + hs * 100 - hu * 50);
		System.out.println(sum);

	}
}


import java.util.Scanner;

/**
 * Created by Mohamad-Ali on 12/1/15.
 */
public class A {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] times = new int[5];
        int[] wrongs = new int[5];
        int[] scores = {500, 1000, 1500, 2000, 2500};
        for (int i = 0; i < 5; i++)
            times[i] = in.nextInt();

        for (int i = 0; i < 5; i++)
            wrongs[i] = in.nextInt();

        double score = in.nextInt() * 100 - in.nextInt() * 50;

        for (int i = 0; i < 5; i++) {
            score += Math.max(0.3 * scores[i], (1-(times[i]/250.0))*scores[i] - 50.0 * wrongs[i]);
        }
        System.out.println(score);
    }
}


import java.util.Scanner;

/**
 * Created by Mohamad-Ali on 12/1/15.
 */
public class A {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] times = new int[5];
        int[] wrongs = new int[5];
        int[] scores = {500, 1000, 1500, 2000, 2500};
        for (int i = 0; i < 5; i++)
            times[i] = in.nextInt();

        for (int i = 0; i < 5; i++)
            wrongs[i] = in.nextInt();

        double score = in.nextInt() * 100 - in.nextInt() * 50;

        for (int i = 0; i < 5; i++) {
            score += Math.max(0.3 * scores[i], (1-(times[i]/250.0))*scores[i] - 50.0 * wrongs[i]);
        }
        System.out.println((long)score);
    }
}


import java.util.*;
public class UncowedForces {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double score=0;
		int[] a = new int[5];
		int[] b = new int[5];
		for(int i=0;i<5;i++) {
			a[i]=in.nextInt();
		}
		for(int i=0;i<5;i++) {
			b[i] = in.nextInt();
		}
		score+= in.nextInt()*100;
		score-= in.nextInt()*50;
		for(int i=0;i<5;i++) {
			score+=Math.max(.3*((1+i)*500), (1-a[i]/250.0)*((i+1)*500)-50*b[i]);
		}
		System.out.println((int)score);
	}
}


import java.util.*;
public class UncowedForces {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double score=0;
		int[] a = new int[5];
		int[] b = new int[5];
		for(int i=0;i<5;i++) {
			a[i]=in.nextInt();
		}
		for(int i=0;i<5;i++) {
			b[i] = in.nextInt();
		}
		score+= in.nextInt()*100;
		score-= in.nextInt()*50;
		for(int i=0;i<5;i++) {
			score+=Math.max(.3*(1+i)*500, (1-a[i]/250.0)*(i+1)*500-50*b[i]);
		}
		System.out.println((int)score);
	}
}


import java.io.*;
import java.util.*;
import java.util.regex.Matcher;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        //Scanner scanner = new Scanner(new File("input.txt"));
        int[] x = {500,1000,1500,2000,2500};
        int[] m = new int[5];
        int[] w = new int[5];
        for (int i = 0; i < 5; i++) {
            m[i]=scanner.nextInt();
        }
        for (int i = 0; i < 5; i++) {
            w[i] = scanner.nextInt();
        }
        double score = 0;
        for (int i = 0; i < 5; i++) {
            score+=Math.max(0.3*x[i],((1.0-m[i]/250.0)*x[i]-50.0*w[i]));
        }
        int hs=scanner.nextInt();
        int hu=scanner.nextInt();
        if (hs!=0) score+=hs*100;
        if (hu!=0) score-=hu*50;
        System.out.println((int)score);

    }
}


import java.io.*;
import java.util.*;
import java.util.regex.Matcher;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        //Scanner scanner = new Scanner(new File("input.txt"));
        int[] x = {500,1000,1500,2000,2500};
        int[] m = new int[5];
        int[] w = new int[5];
        for (int i = 0; i < 5; i++) {
            m[i]=scanner.nextInt();
        }
        for (int i = 0; i < 5; i++) {
            w[i] = scanner.nextInt();
        }
        int score = 0;
        for (int i = 0; i < 5; i++) {
            score+=Math.max(0.3*x[i],((1-m[i]/250.0)*x[i]-50*w[i]));
        }
        int hs=scanner.nextInt();
        int hu=scanner.nextInt();
        if (hs!=0) score+=hs*100;
        if (hu!=0) score-=hu*50;
        System.out.println(score);

    }
}


import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader( System.in));
//int =Integer.parseInt(br.readLine());
String[] parts=br.readLine().split(" ");
double m1 =Double.parseDouble(parts[0]);
double m2 =Double.parseDouble(parts[1]);
double m3 =Double.parseDouble(parts[2]);
double m4 =Double.parseDouble(parts[3]);
double m5 =Double.parseDouble(parts[4]);
parts=br.readLine().split(" ");
double w1 =Double.parseDouble(parts[0]);
double w2 =Double.parseDouble(parts[1]);
double w3 =Double.parseDouble(parts[2]);
double w4 =Double.parseDouble(parts[3]);
double w5 =Double.parseDouble(parts[4]);
parts=br.readLine().split(" ");
double hs =Double.parseDouble(parts[0]);
double hu =Double.parseDouble(parts[1]);
double answer=
Math.max(500*0.3, (1-m1/250)*500-(50*w1))+
Math.max(1000*0.3, (1-m2/250)*1000-(50*w2))+
Math.max(1500*0.3, (1-m3/250)*1500-(50*w3))+
Math.max(2000*0.3, (1-m4/250)*2000-(50*w4))+
Math.max(2500*0.3, (1-m5/250)*2500-(50*w5));
answer+=hs*100;
answer-=hu*50;
System.out.println(answer);

br.close();
}//end of main function
}//end of Main class


import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader( System.in));
//int =Integer.parseInt(br.readLine());
String[] parts=br.readLine().split(" ");
double m1 =Double.parseDouble(parts[0]);
double m2 =Double.parseDouble(parts[1]);
double m3 =Double.parseDouble(parts[2]);
double m4 =Double.parseDouble(parts[3]);
double m5 =Double.parseDouble(parts[4]);
parts=br.readLine().split(" ");
double w1 =Double.parseDouble(parts[0]);
double w2 =Double.parseDouble(parts[1]);
double w3 =Double.parseDouble(parts[2]);
double w4 =Double.parseDouble(parts[3]);
double w5 =Double.parseDouble(parts[4]);
parts=br.readLine().split(" ");
double hs =Double.parseDouble(parts[0]);
double hu =Double.parseDouble(parts[1]);
double answer=
Math.max(500*0.3, (1-m1/250)*500-(50*w1))+
Math.max(1000*0.3, (1-m2/250)*1000-(50*w2))+
Math.max(1500*0.3, (1-m3/250)*1500-(50*w3))+
Math.max(2000*0.3, (1-m4/250)*2000-(50*w4))+
Math.max(2500*0.3, (1-m5/250)*2500-(50*w5));
answer+=hs*100;
answer-=hu*50;
System.out.println((int)answer);

br.close();
}//end of main function
}//end of Main class


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();

	}

	static class TaskC {
		public void solve(int testNumber, InputReader in, PrintWriter out) {
			int m[] = new int[5] ;
			int x[] = new int[5] ;
			int w[] = new int[5] ;
			int sum =0  ;
			for (int i = 0; i < 5; i++)
			{
				m[i]=in.nextInt();
				x[i]=500*(i+1) ;
			}
			for (int i = 0; i <5; i++)
			{
				w[i]= in.nextInt();
				double b = m[i]/250.0 ;
				double d = (x[i]*(1-b)) - (50*w[i]) ;
				sum+= (int)(Math.round(Math.max(0.3*x[i], d))) ;

			}
			int hs = in.nextInt();
			int hu = in.nextInt();
			sum +=(100*hs) ;
			sum+=(-50*hu) ;
			out.print(sum);

		}

		public static boolean isPrime (long num){
			if (num < 2) return false;
			if (num == 2) return true;
			if (num % 2 == 0) return false;
			for (long i = 3*1l; i * i <= num; i += 2)
				if (num % i == 0) return false;
			return true;
		}
	}
	static class InputReader {
		public BufferedReader	reader;
		public StringTokenizer	tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens())
			{
				try
				{
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e)
				{
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

	}
	static class Vertix{
		int x ;
		ArrayList<Vertix> children;
		Vertix parent;

		public Vertix(int x){
			this.x = x ;
			this.children= new ArrayList<Vertix>();
		}

	}

	static class Pair implements Comparable<Pair> {
		int x ;
		int y ;

		public Pair(int x, int y) {
			this.x = x ;
			this.y = y ;

		}

		@Override
		public int compareTo(Pair p) {
			if (this.x < p.x)
				return -1;
			else if (this.x > p.x)
				return 1;
			else
				return 0;

		}
		//
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();

	}

	static class TaskC {
		public void solve(int testNumber, InputReader in, PrintWriter out) {
			int m[] = new int[5] ;
			int x[] = new int[5] ;
			int w[] = new int[5] ;
			int sum =0  ;
			for (int i = 0; i < 5; i++)
			{
				m[i]=in.nextInt();
				x[i]=500*(i+1) ;
			}
			for (int i = 0; i <5; i++)
			{
				w[i]= in.nextInt();
				double b = m[i]/250.0 ;
				double d = (x[i]*(1-b)) - (50*w[i]) ;
				sum+=Math.max(0.3*x[i], d) ;

			}
			int hs = in.nextInt();
			int hu = in.nextInt();
			sum +=(100*hs) ;
			sum+=(-50*hu) ;
			out.print(sum);

		}

		public static boolean isPrime (long num){
			if (num < 2) return false;
			if (num == 2) return true;
			if (num % 2 == 0) return false;
			for (long i = 3*1l; i * i <= num; i += 2)
				if (num % i == 0) return false;
			return true;
		}
	}
	static class InputReader {
		public BufferedReader	reader;
		public StringTokenizer	tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens())
			{
				try
				{
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e)
				{
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

	}
	static class Vertix{
		int x ;
		ArrayList<Vertix> children;
		Vertix parent;

		public Vertix(int x){
			this.x = x ;
			this.children= new ArrayList<Vertix>();
		}

	}

	static class Pair implements Comparable<Pair> {
		int x ;
		int y ;

		public Pair(int x, int y) {
			this.x = x ;
			this.y = y ;

		}

		@Override
		public int compareTo(Pair p) {
			if (this.x < p.x)
				return -1;
			else if (this.x > p.x)
				return 1;
			else
				return 0;

		}
		//
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Solution {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] input = in.readLine().split(" ");
		int[] arr = new int[5];
		for (int i = 0; i < 5; i++) {
			arr[i] = Integer.parseInt(input[i]);
		}
		input = in.readLine().split(" ");
		int[] wrong = new int[5];
		for (int i = 0; i < 5; i++) {
			wrong[i] = Integer.parseInt(input[i]);
		}
		input = in.readLine().split(" ");
		in.close();
		int hs = Integer.parseInt(input[0]);
		int hw = Integer.parseInt(input[1]);
		int[] score = {500, 1000, 1500, 2000, 2500};
		double total = 0;
		for (int i = 0; i < 5; i++) {
			total += Math.max(0.3 * score[i], (1 - arr[i] / 250.0) * score[i] - 50 * wrong[i]);
		}
		total += hs * 100;
		total -= hw * 50;
		System.out.println((int) total);
	}
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Solution {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] input = in.readLine().split(" ");
		int[] arr = new int[5];
		for (int i = 0; i < 5; i++) {
			arr[i] = Integer.parseInt(input[i]);
		}
		input = in.readLine().split(" ");
		int[] wrong = new int[5];
		for (int i = 0; i < 5; i++) {
			wrong[i] = Integer.parseInt(input[i]);
		}
		input = in.readLine().split(" ");
		in.close();
		int hs = Integer.parseInt(input[0]);
		int hw = Integer.parseInt(input[1]);
		int[] score = {500, 1000, 1500, 2000, 2500};
		int total = 0;
		for (int i = 0; i < 5; i++) {
			total += Math.max(0.3 * score[i], (1 - arr[i] / 250.0) * score[i] - 50 * wrong[i]);
		}
		total += hs * 100;
		total -= hw * 50;
		System.out.println(total);
	}
}


import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.PrintWriter;
import java.io.OutputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int[] min = IOUtils.readIntArray(in, 5);
            int[] wrong = IOUtils.readIntArray(in, 5);
            int hackgood = in.readInt(), hackbad = in.readInt();
            Rational result = new Rational(0, 1);
            for(int problem = 0; problem < min.length; problem++) {
                int max = 500 * (problem + 1);
                Rational worth = new Rational(max * 3 / 10, 1);
                Rational otherworth = new Rational(min[problem], 250);
                Rational oneminother = new Rational(1, 1).subtract(otherworth);
                oneminother = oneminother.multiply(max);
                oneminother = oneminother.subtract(new Rational(50 * wrong[problem], 1));
                if(worth.compareTo(oneminother) > 0) result = result.add(worth);
                else result = result.add(oneminother);
            }
            result = result.add(new Rational(hackgood * 100, 1));
            result = result.subtract(new Rational(hackbad * 50, 1));
            out.printLine(result.numerator);
        }

    }

    static class Rational implements Comparable<Rational> {
        public final long numerator;
        public final long denominator;

        public Rational(long numerator, long denominator) {
            if(denominator == 0)
                throw new IllegalArgumentException();
            long gcd = IntegerUtils.gcd(Math.abs(numerator), Math.abs(denominator));
            if(denominator > 0) {
                this.numerator = numerator / gcd;
                this.denominator = denominator / gcd;
            } else {
                this.numerator = -numerator / gcd;
                this.denominator = -denominator / gcd;
            }
        }

        public String toString() {
            return numerator + "/" + denominator;
        }

        public int compareTo(Rational other) {
            return IntegerUtils.longCompare(numerator * other.denominator, denominator * other.numerator);
//		return BigInteger.valueOf(numerator).multiply(BigInteger.valueOf(other.denominator)).compareTo(
//			BigInteger.valueOf(other.numerator).multiply(BigInteger.valueOf(denominator)));
        }

        public Rational add(Rational other) {
            return new Rational(numerator * other.denominator + denominator * other.numerator,
                    denominator * other.denominator);
        }

        public Rational multiply(long number) {
            return new Rational(numerator * number, denominator);
        }

        public Rational subtract(Rational other) {
            return new Rational(numerator * other.denominator - denominator * other.numerator,
                    denominator * other.denominator);
        }

        public boolean equals(Object o) {
            if(this == o) return true;
            if(o == null || getClass() != o.getClass()) return false;

            Rational rational = (Rational) o;

            if(denominator != rational.denominator) return false;
            if(numerator != rational.numerator) return false;

            return true;
        }

        public int hashCode() {
            int result = (int) (numerator ^ (numerator >>> 32));
            result = 31 * result + (int) (denominator ^ (denominator >>> 32));
            return result;
        }

    }

    static class IOUtils {
        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for(int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(long i) {
            writer.println(i);
        }

    }

    static class IntegerUtils {
        public static long gcd(long a, long b) {
            a = Math.abs(a);
            b = Math.abs(b);
            while(b != 0) {
                long temp = a % b;
                a = b;
                b = temp;
            }
            return a;
        }

        public static int longCompare(long a, long b) {
            if(a < b)
                return -1;
            if(a > b)
                return 1;
            return 0;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.PrintWriter;
import java.io.OutputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int[] min = IOUtils.readIntArray(in, 5);
            int[] wrong = IOUtils.readIntArray(in, 5);
            int hackgood = in.readInt(), hackbad = in.readInt();
            Rational result = new Rational(0, 1);
            for(int problem = 0; problem < min.length; problem++) {
                int max = 500 * (problem + 1);
                Rational worth = new Rational(max * 3 / 10, 1);
                Rational otherworth = new Rational(min[problem], 250);
                Rational oneminother = new Rational(1, 1).subtract(otherworth);
                oneminother = oneminother.multiply(max);
                oneminother = oneminother.subtract(new Rational(50 * wrong[problem], 1));
                if(worth.compareTo(oneminother) > 0) result = result.add(worth);
                else result = result.add(oneminother);
            }
            result = result.add(new Rational(hackgood * 100, 1));
            result = result.subtract(new Rational(hackbad * 100, 1));
            out.printLine(result.numerator);
        }

    }

    static class Rational implements Comparable<Rational> {
        public final long numerator;
        public final long denominator;

        public Rational(long numerator, long denominator) {
            if(denominator == 0)
                throw new IllegalArgumentException();
            long gcd = IntegerUtils.gcd(Math.abs(numerator), Math.abs(denominator));
            if(denominator > 0) {
                this.numerator = numerator / gcd;
                this.denominator = denominator / gcd;
            } else {
                this.numerator = -numerator / gcd;
                this.denominator = -denominator / gcd;
            }
        }

        public String toString() {
            return numerator + "/" + denominator;
        }

        public int compareTo(Rational other) {
            return IntegerUtils.longCompare(numerator * other.denominator, denominator * other.numerator);
//		return BigInteger.valueOf(numerator).multiply(BigInteger.valueOf(other.denominator)).compareTo(
//			BigInteger.valueOf(other.numerator).multiply(BigInteger.valueOf(denominator)));
        }

        public Rational add(Rational other) {
            return new Rational(numerator * other.denominator + denominator * other.numerator,
                    denominator * other.denominator);
        }

        public Rational multiply(long number) {
            return new Rational(numerator * number, denominator);
        }

        public Rational subtract(Rational other) {
            return new Rational(numerator * other.denominator - denominator * other.numerator,
                    denominator * other.denominator);
        }

        public boolean equals(Object o) {
            if(this == o) return true;
            if(o == null || getClass() != o.getClass()) return false;

            Rational rational = (Rational) o;

            if(denominator != rational.denominator) return false;
            if(numerator != rational.numerator) return false;

            return true;
        }

        public int hashCode() {
            int result = (int) (numerator ^ (numerator >>> 32));
            result = 31 * result + (int) (denominator ^ (denominator >>> 32));
            return result;
        }

    }

    static class IOUtils {
        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for(int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(long i) {
            writer.println(i);
        }

    }

    static class IntegerUtils {
        public static long gcd(long a, long b) {
            a = Math.abs(a);
            b = Math.abs(b);
            while(b != 0) {
                long temp = a % b;
                a = b;
                b = temp;
            }
            return a;
        }

        public static int longCompare(long a, long b) {
            if(a < b)
                return -1;
            if(a > b)
                return 1;
            return 0;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Codeforces334Div2ProblemA {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int[] mins = Arrays.stream(scanner.nextLine().split(" "))
					.mapToInt(s -> Integer.valueOf(s)).toArray();
			int[] wroingSubNums = Arrays.stream(scanner.nextLine().split(" "))
					.mapToInt(s -> Integer.valueOf(s)).toArray();
			int hs = scanner.nextInt();
			int hu = scanner.nextInt();

			int[] scores = IntStream.range(1, 6).map(i -> i * 500).toArray();

			int score = 0;
			for (int i = 0; i < 5; i++) {
				score += Math.max(0.3 * scores[i], (scores[i] - scores[i] / 250
						* mins[i])
						- 50 * wroingSubNums[i]);
			}
			score += 100 * hs;
			score -= 50 * hu;
			System.out.println(score);
		}
	}
}


import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Codeforces334Div2ProblemA {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int[] mins = Arrays.stream(scanner.nextLine().split(" "))
					.mapToInt(s -> Integer.valueOf(s)).toArray();
			int[] wroingSubNums = Arrays.stream(scanner.nextLine().split(" "))
					.mapToInt(s -> Integer.valueOf(s)).toArray();
			int hs = scanner.nextInt();
			int hu = scanner.nextInt();

			int[] scores = IntStream.range(1, 6).map(i -> i * 500).toArray();

			int score = 0;
			for (int i = 0; i < 5; i++) {
				score += Math.max(0.3 * scores[i], (1 - mins[i] * 1.0 / 250)
						* scores[i] - 50 * wroingSubNums[i]);
			}
			score += 100 * hs;
			score += 100 * hu;
			System.out.println(score);
		}
	}
}


import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Codeforces334Div2ProblemA {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int[] mins = Arrays.stream(scanner.nextLine().split(" "))
					.mapToInt(s -> Integer.valueOf(s)).toArray();
			int[] wroingSubNums = Arrays.stream(scanner.nextLine().split(" "))
					.mapToInt(s -> Integer.valueOf(s)).toArray();
			int hs = scanner.nextInt();
			int hu = scanner.nextInt();

			int[] scores = IntStream.range(1, 6).map(i -> i * 500).toArray();

			int score = 0;
			for (int i = 0; i < 5; i++) {
				score += Math.max(0.3 * scores[i], (1 - mins[i] * 1.0 / 250)
						* scores[i] - 50 * wroingSubNums[i]);
			}
			score += 100 * hs;
			score -= 50 * hu;
			System.out.println(score);
		}
	}
}


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

public class UncowedForces {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[] x = {500, 1000, 1500, 2000, 2500};

		StringTokenizer s = new StringTokenizer(in.readLine());
		int[] m = new int[5];
		for (int i = 0; i < 5; i++) {
			m[i] = Integer.parseInt(s.nextToken());
		}

		s = new StringTokenizer(in.readLine());
		int[] w = new int[5];
		for (int i = 0; i < 5; i++) {
			w[i] = Integer.parseInt(s.nextToken());
		}

		s = new StringTokenizer(in.readLine());
		int hs = Integer.parseInt(s.nextToken());
		int hu = Integer.parseInt(s.nextToken());

		int res = hs * 100 - hu * 50;
		for (int i = 0; i < 5; i++) {
			res += Math.max(0.3 * x[i], (1 - (m[i] / 250.0)) * x[i] - 50 * w[i]);
		}

		System.out.println(res);
	}
}


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

public class UncowedForces {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[] x = {500, 1000, 1500, 2000, 2500};

		StringTokenizer s = new StringTokenizer(in.readLine());
		int[] m = new int[5];
		for (int i = 0; i < 5; i++) {
			m[i] = Integer.parseInt(s.nextToken());
		}

		s = new StringTokenizer(in.readLine());
		int[] w = new int[5];
		for (int i = 0; i < 5; i++) {
			w[i] = Integer.parseInt(s.nextToken());
		}

		s = new StringTokenizer(in.readLine());
		int hs = Integer.parseInt(s.nextToken());
		int hu = Integer.parseInt(s.nextToken());

		int res = hs * 100 - hu * 50;
		for (int i = 0; i < 5; i++) {
			int score = (int) Math.max(3 * x[i] / 10, (x[i] - ((m[i] * x[i]) / 250)) - 50 * w[i]);
			res += score;
		}

		System.out.println(res);
	}
}


//package A;
// In the name of Allah
// Haj_Vahid

import java.util.Scanner;

public class UncowedForces {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int[] points = {500, 1000, 1500, 2000, 2500};

        int[] m = new int[5];
        int[] w = new int[5];

        int sum = 0;
        for (int i=0; i<5; i++){
            m[i] = s.nextInt();
        }
        for (int i=0; i<5; i++){
            w[i] = s.nextInt();
        }

        for (int i=0; i<5; i++){
            int a = (250-m[i])*(points[i]/250) - (w[i] * 50);
            int b = (points[i]*3)/10;

            sum += Math.max(a,b) ;
        }

        sum += (s.nextInt()*100);
        sum -= (s.nextInt()*50);

        System.out.println(sum);
    }
}


//package A;
// In the name of Allah
// Haj_Vahid

import java.util.Scanner;

public class UncowedForces {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int[] points = {500, 1000, 1500, 2000, 2500};

        int sum = 0;
        for (int i=0; i<5; i++){
            int m = s.nextInt();
            sum += (250-m)*(points[i]/250);
        }

        for (int i=0; i<5; i++){
            int w = s.nextInt();
            sum -= (w * 50);
        }
        sum += (s.nextInt()*100);
        sum -= (s.nextInt()*50);

        System.out.println(sum);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class A {

	Scanner scanner = new Scanner(System.in);
	BufferedReader cin = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter cout = new PrintWriter(System.out);
	StringTokenizer tok;

	double[] m, w, x;

	double h1, h2;

	double ans = 0;

	private void run() throws IOException {

		m = new double[5];
		w = new double[5];
		x = new double[5];

		for (int i = 0; i < 5; ++i) {
			x[i] = 500 * (i + 1);
		}

		for (int i = 0; i < 5; ++i) {
			m[i] = scanner.nextDouble();
			//System.out.println(m[i]);
		}

		for (int i = 0; i < 5; ++i) {
			w[i] = scanner.nextDouble();
			//System.out.println(x[i]);
		}

		h1 = scanner.nextDouble();
		h2 = scanner.nextDouble();

		for (int i = 0; i < 5; ++i) {
			ans = ans + Math.max(0.3 * x[i], (1 - m[i] / 250) * x[i] - 50 * w[i]);
			//System.out.println(ans);
		}

		ans += 100 * h1;
		ans -= 50 * h2;

		cout.println((int)(ans));

		scanner.close();
		cin.close();
		cout.close();
	}

	public static void main(String[] args) throws IOException {
		A solution = new A();
		solution.run();
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class A {

	Scanner scanner = new Scanner(System.in);
	BufferedReader cin = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter cout = new PrintWriter(System.out);
	StringTokenizer tok;

	double[] m, w, x;

	double h1, h2;

	double ans = 0;

	private void run() throws IOException {

		m = new double[5];
		w = new double[5];
		x = new double[5];

		for (int i = 0; i < 5; ++i) {
			x[i] = 500 * (i + 1);
		}

		for (int i = 0; i < 5; ++i) {
			m[i] = scanner.nextDouble();
			//System.out.println(m[i]);
		}

		for (int i = 0; i < 5; ++i) {
			w[i] = scanner.nextDouble();
			//System.out.println(x[i]);
		}

		h1 = scanner.nextDouble();
		h2 = scanner.nextDouble();

		for (int i = 0; i < 5; ++i) {
			ans = ans + Math.max(0.3 * x[i], (1 - m[i] / 250) * x[i] - 50 * w[i]);
			//System.out.println(ans);

			//System.out.println(x[i]);
			//System.out.println(0.3 * x[i]);
			//System.out.println((1 - m[i] / 250) * x[i] - 50 * w[i]);
		}

		ans += 100 * h1;
		ans -= 50 * h2;

		cout.println(ans);

		scanner.close();
		cin.close();
		cout.close();
	}

	public static void main(String[] args) throws IOException {
		A solution = new A();
		solution.run();
	}
}


import java.io.*;
import java.util.*;

public class A
{

	FastScanner in;
	PrintWriter out;
	int i = 0, j = 0;

	void solve() {
		/**************START**************/
		int[] m = new int[5];
		int[] w = new int[5];
		int cur = 0;
		double curD = 0;
		for (i = 0; i < 5; i++)
		{
			m[i] = in.nextInt();
		}
		for (i = 0; i < 5; i++)
		{
			w[i] = in.nextInt();
		}
		int h1 = in.nextInt(), h2 = in.nextInt();

		int total = 0;
		int[] maxScores = {500, 1000, 1500, 2000, 2500};
		int[] mins = {150, 300, 500, 600, 750};
		for (i = 0; i < 5; i++)
		{
			curD = (double)(1.0 - (double)m[i]/250)*(double)maxScores[i] - 50.0 * (double)w[i];
			cur = (int)Math.round(curD);
			total += Math.max(mins[i], cur);
		}
		total += (h1 * 100);
		total -= (h2 * 50);
		out.println(total);

		/***************END***************/
	}

	public static void main(String[] args) {
		new A().runIO();
	}

	void runIO() {
		in = new FastScanner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

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

		//This will empty out the current line (if non-empty) and return the next line down. If the next line is empty, will return the empty string.
		String nextLine() {
				st = null;
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				return s;
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

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

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

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


import java.io.*;
import java.util.*;

public class A
{

	FastScanner in;
	PrintWriter out;
	int i = 0, j = 0;

	void solve() {
		/**************START**************/
		int[] m = new int[5];
		int[] w = new int[5];
		int cur = 0;
		double curD = 0;
		for (i = 0; i < 5; i++)
		{
			m[i] = in.nextInt();
		}
		for (i = 0; i < 5; i++)
		{
			w[i] = in.nextInt();
		}
		int h1 = in.nextInt(), h2 = in.nextInt();

		int total = 0;
		int[] maxScores = {500, 1000, 1500, 2000, 2500};
		int[] mins = {150, 300, 450, 600, 750};
		for (i = 0; i < 5; i++)
		{
			curD = (double)(1.0 - (double)m[i]/250)*(double)maxScores[i] - 50.0 * (double)w[i];
			cur = (int)Math.round(curD);
			total += Math.max(mins[i], cur);
		}
		total += (h1 * 100);
		total -= (h2 * 50);
		out.println(total);

		/***************END***************/
	}

	public static void main(String[] args) {
		new A().runIO();
	}

	void runIO() {
		in = new FastScanner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

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

		//This will empty out the current line (if non-empty) and return the next line down. If the next line is empty, will return the empty string.
		String nextLine() {
				st = null;
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				return s;
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

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

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

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


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[] m = new int[6];
        int[] w=new int[6];
        int scc=500,i,j,k,hu,hk,tsc=0;
        for(i=0;i<5;i++){
           m[i]=sc.nextInt();
        }
        for(j=0;j<5;j++){
           w[j]=sc.nextInt();
        }
        hu=sc.nextInt();
        hk=sc.nextInt();
        double result=0.0;
        for(k=0;k<5;k++){
            double x=0.3*scc;
            double y=((1.0-((m[k]/250.0)))*scc)-(50.0*w[k]);
            int com=Double.compare(x, y);
            if(com>=0)
                result=result+x;
            else
                result=result+y;
            scc+=500;
        }
       tsc=(int)result+(hu*100)-(hk*50);
      System.out.println(tsc);
    }

}


public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[] m = new int[6];
        int[] w=new int[6];
        int scc=500,i,j,k,hu,hk,tsc=0;
        for(i=0;i<5;i++){
           m[i]=sc.nextInt();
        }
        for(j=0;j<5;j++){
           w[j]=sc.nextInt();
        }
        hu=sc.nextInt();
        hk=sc.nextInt();
        double result=0.0;
        for(k=0;k<5;k++){
            double x=0.3*scc;
            double y=((1.0-((m[k]/250.0)))*scc)-(50.0*w[k]);
            int com=Double.compare(x, y);
            if(com>=0)
                result=result+x;
            else
                result=result+y;
            scc+=500;
        }
       tsc=(int)result+(hu*100)-(hk*50);
      System.out.println(tsc);
    }

}


import java.util.Scanner;

public class A
{

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int [] x = {500,1000,1500,2000,2500};
        int [] m = new int [5];
        int [] w = new int [5];

        int h1;
        int h2;
        for (int i=0;i<5;i++)
            m[i] = sc.nextInt();

        for (int i=0;i<5;i++)
            w[i] = sc.nextInt();
        h1=sc.nextInt();
        h2=sc.nextInt();

        int res=0;
        for (int i=0;i<5;i++)
        {
            int temp = (int) (0.3*x[i]);
            if ((x[i]-(m[i]*(x[i]/250))-50*w[i]) < temp)
            {
                res = res + (int) (0.3*x[i]);
            }
            else
            {
                res += (x[i]-(m[i]*(x[i]/250))-50*w[i]);
            }
        }
        res = res + 100*h1-50*h2;

        System.out.print(res);
    }
}


import java.util.Scanner;

public class A
{

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int [] x = {500,1000,1500,2000,2500};
        double [] m = new double [5];
        int [] w = new int [5];

        int h1;
        int h2;
        for (int i=0;i<5;i++)
            m[i] = sc.nextInt();

        for (int i=0;i<5;i++)
            w[i] = sc.nextInt();
        h1=sc.nextInt();
        h2=sc.nextInt();

        int res=0;
        for (int i=0;i<5;i++)
        {

            if ((int) ((1-m[i]/250)*x[i]-50*w[i]) < 0.3*x[i])
            {
                res = (int) res + (int) (0.3*x[i]);
            }
            else
            {
                res = (int) (res + (1-m[i]/250)*x[i]-50*w[i]);
            }
        }
        res = res + 100*h1-50*h2;

        System.out.print(res);
    }
}


import java.util.*;
import java.io.*;

public class CF604A{
  static int a, b ,c, min = 0, max = 100000;
  public static void main(String[] args)throws IOException, Exception {
    InputReader in = new InputReader(System.in);
    PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
    int [] m = new int[5], w = new int[5], h = new int[2];
    int[] p = { 500, 1000, 1500, 2000,  2500};
    int x  = 0;
    for(int i = 0; i < 5; i++){
      m[i] = in.nextInt();
      if(m[i] != 0) x++;
    }
    for(int i = 0; i < 5; i++){
      w[i] = in.nextInt();
    }
    for(int i = 0; i < 2; i++){
      h[i] = in.nextInt();
    }
    double sum = 0;
    for(int i = 0; i < 5; i++){
     // sum+=  Math.max(0.3*p[i], 1.0 - (m[i]/250.0)*p[i] - 50*w[i]);
      sum+= (1.0 - (m[i]/250.0))*p[i] - w[i]*50;
    }
    sum+=h[0]*100;
    sum-=h[1]*50;
    pw.println((long)sum);
    pw.close();
  }

  static class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
      reader = new BufferedReader(new InputStreamReader(stream));
      tokenizer = null;
    }

    public String next() {
      try {
        while (tokenizer == null || !tokenizer.hasMoreTokens())
          tokenizer = new StringTokenizer(reader.readLine());
      } catch (IOException e) {
        throw new RuntimeException(e);
      }

      return tokenizer.nextToken();
    }

    public String nextLine() {
      String line = null;
      try {
        tokenizer = null;
        line =  reader.readLine();
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return line;
    }

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

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

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


import java.util.*;
import java.io.*;

public class CF604A{
  static int a, b ,c, min = 0, max = 100000;
  public static void main(String[] args)throws IOException, Exception {
    InputReader in = new InputReader(System.in);
    PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
    int [] m = new int[5], w = new int[5], h = new int[2];
    int[] p = { 500, 1000, 1500, 2000,  2500};
    int x  = 0;
    for(int i = 0; i < 5; i++){
      m[i] = in.nextInt();
      if(m[i] != 0) x++;
    }
    for(int i = 0; i < 5; i++){
      w[i] = in.nextInt();
    }
    for(int i = 0; i < 2; i++){
      h[i] = in.nextInt();
    }
    double sum = 0;
    for(int i = 0; i < 5; i++){
     // sum+=  Math.max(0.3*p[i], 1.0 - (m[i]/250.0)*p[i] - 50*w[i]);
      double temp = (1.0 - (m[i]/250.0))*p[i] - w[i]*50;
      sum+= Math.max(temp, 0.3*p[i]);
    }
    sum+=h[0]*100;
    sum-=h[1]*50;
    pw.println((long)sum);
    pw.close();
  }

  static class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
      reader = new BufferedReader(new InputStreamReader(stream));
      tokenizer = null;
    }

    public String next() {
      try {
        while (tokenizer == null || !tokenizer.hasMoreTokens())
          tokenizer = new StringTokenizer(reader.readLine());
      } catch (IOException e) {
        throw new RuntimeException(e);
      }

      return tokenizer.nextToken();
    }

    public String nextLine() {
      String line = null;
      try {
        tokenizer = null;
        line =  reader.readLine();
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return line;
    }

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

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

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


import java.util.*;
public class main{

public static void main (String[] Args){

Scanner s=new Scanner(System.in);
int score=0;
int[] arr1={500,1000,1500,2000,2500};
int[] arr2=new int[5];

for(int i=0; i<5;i++){
arr2[i]=s.nextInt();
}

for(int j=0;j<5;j++){
score+=Math.max(0.3*arr1[j],(1-(arr2[j]/250))*arr1[j]-50*s.nextInt());
}
score+=s.nextInt()*100;
score-=s.nextInt()*50;
System.out.println(score);
}
}


import java.util.*;
public class Main{

public static void main (String[] Args){

Scanner s=new Scanner(System.in);
int score=0;
int[] arr1={500,1000,1500,2000,2500};
int[] arr2=new int[5];

for(int i=0; i<5;i++){
arr2[i]=s.nextInt();
}

for(int j=0;j<5;j++){
score+=Math.max(0.3*arr1[j],(1-((1.0)*arr2[j]/250))*arr1[j]-50*s.nextInt());
}
score+=s.nextInt()*100;
score-=s.nextInt()*50;
System.out.println(score);
}
}


import java.util.*;
public class Main{

public static void main (String[] Args){

Scanner s=new Scanner(System.in);
int score=0;
int[] arr1={500,1000,1500,2000,2500};
int[] arr2=new int[5];

for(int i=0; i<5;i++){
arr2[i]=s.nextInt();
}

for(int j=0;j<5;j++){
score+=Math.max(0.3*arr1[j],((250-arr2[j])/250)*arr1[j]-50*s.nextInt());
}
score+=s.nextInt()*100;
score-=s.nextInt()*50;
System.out.println(score);
}
}


import java.util.*;
public class Main{

public static void main (String[] Args){

Scanner s=new Scanner(System.in);
int score=0;
int[] arr1={500,1000,1500,2000,2500};
int[] arr2=new int[5];

for(int i=0; i<5;i++){
arr2[i]=s.nextInt();
}

for(int j=0;j<5;j++){
score+=Math.max(0.3*arr1[j],(250-arr2[j]/250)*arr1[j]-50*s.nextInt());
}
score+=s.nextInt()*100;
score-=s.nextInt()*50;
System.out.println(score);
}
}


import java.util.*;
public class Main{

public static void main (String[] Args){

Scanner s=new Scanner(System.in);
int score=0;
int[] arr1={500,1000,1500,2000,2500};
int[] arr2=new int[5];

for(int i=0; i<5;i++){
arr2[i]=s.nextInt();
}

for(int j=0;j<5;j++){
score+=Math.max(0.3*arr1[j],(((1.0)*(250-arr2[j]))/250)*arr1[j]-50*s.nextInt());
}
score+=s.nextInt()*100;
score-=s.nextInt()*50;
System.out.println(score);
}
}


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

public class Main {

	static int MOD = 1000 * 1000 * 1000 + 7;

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		solve(in, out);
		out.close();
		System.exit(0);
	}

	private static void solve(InputReader in, PrintWriter out) {

		double[] sub = new double[5];
		double[] wrong = new double[5];
		for (int i = 0; i < 5; i++) {
			sub[i] = in.nextInt();
		}
		for (int i = 0; i < 5; i++) {
			wrong[i] = in.nextInt();
		}
		int hs = in.nextInt();
		int hu = in.nextInt();

		double score = hs * 100 - 50 * hu;

		for (int i = 0; i < 5; i++) {
			double X = 500 * (i + 1);
			score += Math.max(0.3 * X, (1 - sub[i] / 250) * X - 50 * wrong[i]);
		}

		out.print((int) (score + 0.5));
	}

	/*
	 *
	 */
	// --------------------------------------------------------
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

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

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

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}
}


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

public class Main {

	static int MOD = 1000 * 1000 * 1000 + 7;

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		solve(in, out);
		out.close();
		System.exit(0);
	}

	private static void solve(InputReader in, PrintWriter out) {

		double[] sub = new double[5];
		double[] wrong = new double[5];
		for (int i = 0; i < 5; i++) {
			sub[i] = in.nextInt();
		}
		for (int i = 0; i < 5; i++) {
			wrong[i] = in.nextInt();
		}
		int hs = in.nextInt();
		int hu = in.nextInt();

		double score = hs * 100 - 50 * hu;

		for (int i = 0; i < 5; i++) {
			double X = 500 * (i + 1);
			score += Math.max(0.3 * X, (1 - sub[i] / 250) * X - 50 * wrong[i]);
		}

		int scoreInt = (int) score;
		if (score - scoreInt < scoreInt + 1 - score) {
			out.print(scoreInt);
		} else {
			out.print(scoreInt);
		}
	}

	/*
	 *
	 */
	// --------------------------------------------------------
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

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

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

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}
}


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

public class Main {

	static int MOD = 1000 * 1000 * 1000 + 7;

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		solve(in, out);
		out.close();
		System.exit(0);
	}

	private static void solve(InputReader in, PrintWriter out) {

		double[] sub = new double[5];
		double[] wrong = new double[5];
		for (int i = 0; i < 5; i++) {
			sub[i] = in.nextInt();
		}
		for (int i = 0; i < 5; i++) {
			wrong[i] = in.nextInt();
		}
		int hs = in.nextInt();
		int hu = in.nextInt();

		double score = hs * 100 - 50 * hu;

		for (int i = 0; i < 5; i++) {
			double X = 500 * (i + 1);
			score += Math.max(0.3 * X, (1 - sub[i] / 250) * X - 50 * wrong[i]);
		}

		int scoreInt = (int) score;
		if (score - scoreInt < scoreInt + 1 - score) {
			out.print(scoreInt);
		} else {
			out.print(scoreInt + 1);
		}
	}

	/*
	 *
	 */
	// --------------------------------------------------------
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

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

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

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}
}


import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader kb = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer m = new StringTokenizer(kb.readLine()), w = new StringTokenizer(
				kb.readLine()), h = new StringTokenizer(kb.readLine());
		int[] mins = { 150, 300, 450, 600, 750 }, x = { 2, 4, 6, 8, 10 }, p = new int[5];
		int counter = 0;
		for (int i = 0; i < 5; i++) {
			p[i] = (250 - Integer.parseInt(m.nextToken())) * x[i] - 50
					* Integer.parseInt(w.nextToken());
			counter += p[i] > mins[i] ? p[i] : mins[i];
		}
		counter += 100 * Integer.parseInt(h.nextToken()) - 50
				* Integer.parseInt(h.nextToken());
		System.out.println(counter);
	}
}


import java.io.*;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader kb = new BufferedReader(new InputStreamReader(System.in));
		String[] m = kb.readLine().split(" "), w = kb.readLine().split(" "), h = kb
				.readLine().split(" ");
		int[] mins = { 150, 300, 450, 600, 750 }, x = { 2, 4, 6, 8, 10 }, p = new int[5];
		int counter = 0;
		for (int i = 0; i < 5; i++) {
			p[i] = (250 - Integer.parseInt(m[i])) * x[i] - 50
					* Integer.parseInt(w[i]);
			counter += p[i] > mins[i] ? p[i] : mins[i];
		}
		counter += 100 * Integer.parseInt(h[0]) - 50 * Integer.parseInt(h[1]);
		System.out.println(counter);
	}
}


import java.io.*;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader kb = new BufferedReader(new InputStreamReader(System.in));
		String[] m = kb.readLine().split(" "), w = kb.readLine().split(" "), h = kb
				.readLine().split(" ");
		int[] mins = { 150, 300, 450, 600, 750 }, x = { 2, 4, 6, 8, 10 };
		int counter = 0;
		for (int i = 0; i < 5; i++)
			counter += Math.max(mins[i], (250 - Integer.parseInt(m[i])) * x[i]
					- 50 * Integer.parseInt(w[i]));
		counter += 100 * Integer.parseInt(h[0]) - 50 * Integer.parseInt(h[1]);
		System.out.println(counter);

	}
}


import java.util.*;
public class UncowedForces {
    public static void main(String[] args) {
        Scanner in = new Scanner (System.in);
        int[] m = new int[5];
        int[] w = new int[5];
        int[] x = {500,1000,1500,2000,2500};
        for (int i = 0; i < 5; i++){m[i]=in.nextInt();}
        for (int i = 0; i < 5; i++){w[i]=in.nextInt();}
        int hs = in.nextInt();
        int hu = in.nextInt();
        int sum = 0;
        for (int i = 0; i < 5; i++) {
            double re = Math.max((0.3*x[i]),((1-(m[i]/250.0))*x[i])-(50*w[i]));
            sum += re;
        }
        sum = sum +((hs*100)-(hu*50));
        System.out.println(sum);
    }
}


import java.util.*;
public class UncowedForces {
    public static void main(String[] args) {
        Scanner in = new Scanner (System.in);
        int[] m = new int[5];
        int[] w = new int[5];
        for (int i = 0; i < 5; i++){m[i]=in.nextInt();}
        for (int i = 0; i < 5; i++){w[i]=in.nextInt();}
        int hs = in.nextInt();
        int hu = in.nextInt();
        int sum = 0;
        double re1 = ((1-(m[0]/250.0))*500)-(50*w[0]);sum+=re1;
        double re2 = ((1-(m[1]/250.0))*1000)-(50*w[1]);sum+=re2;
        double re3 = ((1-(m[2]/250.0))*1500)-(50*w[2]);sum+=re3;
        double re4 = ((1-(m[3]/250.0))*2000)-(50*w[3]);sum+=re4;
        double re5 = ((1-(m[4]/250.0))*2500)-(50*w[4]);sum+=re5;
        //System.out.println(sum);
        sum = sum +((hs*100)-(hu*50));
        System.out.println(sum);
    }
}


import java.util.*;
public class UncowedForces {
    public static void main(String[] args) {
        Scanner in = new Scanner (System.in);
        int[] m = new int[5];
        int[] w = new int[5];
        for (int i = 0; i < 5; i++){m[i]=in.nextInt();}
        for (int i = 0; i < 5; i++){w[i]=in.nextInt();}
        int hs = in.nextInt();
        int hu = in.nextInt();
        int sum = 0;
        double re1 = ((1-(m[0]/250.0))*500)-(50*w[0]);sum+=re1;
        double re2 = ((1-(m[1]/250.0))*1000)-(50*w[1]);sum+=re2;
        double re3 = ((1-(m[2]/250.0))*1500)-(50*w[2]);sum+=re3;
        double re4 = ((1-(m[3]/250.0))*2000)-(50*w[3]);sum+=re4;
        double re5 = ((1-(m[4]/250.0))*2500)-(50*w[4]);sum+=re5;
        //System.out.println(sum);
        sum = sum +((hs*100)+(hu*50));
        System.out.println(sum);
    }
}


import java.util.*;
public class UncowedForces {
    public static void main(String[] args) {
        Scanner in = new Scanner (System.in);
        int[] m = new int[5];
        int[] w = new int[5];
        int[] x = {500,1000,1500,2000,2500};
        for (int i = 0; i < 5; i++){m[i]=in.nextInt();}
        for (int i = 0; i < 5; i++){w[i]=in.nextInt();}
        int hs = in.nextInt();
        int hu = in.nextInt();
        double sum = 0;
        for (int i = 0; i < 5; i++) {
            double re = Math.max((0.3*x[i]),((1-(m[i]/250.0))*x[i])-(50*w[i]));
            sum += re;
        }
        //System.out.println(sum);
        sum += (hs*100)-(hu*50);
        System.out.printf("%.0f\n",sum);
    }
}


import java.util.Scanner;

/*
 * 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.
 */
/**
 *
 * @author Dell
 */
public class NewMain54 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner s = new Scanner(System.in);
        int[] x = {500, 1000, 1500, 2000, 2500};
        int[] m = new int[5];
        for (int i = 0; i < 5; i++) {
            m[i] = s.nextInt();
        }
        int[] w = new int[5];
        for (int i = 0; i < 5; i++) {
            w[i] = s.nextInt();
        }
        int suc = s.nextInt();
        int wrong = s.nextInt();
        int ans = 0;
        for (int i = 0; i < 5; i++) {
            ans += Math.max(x[i] * 0.3, (1 - (m[i] / 250.0)) * x[i] - (50 * (w[i])));
        }

        ans += suc * 100;
        ans -= wrong * 50;

        System.out.println(ans);
    }

}


import java.util.Scanner;

/*
 * 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.
 */
/**
 *
 * @author Dell
 */
public class NewMain54 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner s = new Scanner(System.in);
        int[] x = {500, 1000, 1500, 2000, 2500};
        int[] m = new int[5];
        for (int i = 0; i < 5; i++) {
            m[i] = s.nextInt();
        }
        int[] w = new int[5];
        for (int i = 0; i < 5; i++) {
            w[i] = s.nextInt();
        }
        int suc = s.nextInt();
        int wrong = s.nextInt();
        double ans = 0;
        for (int i = 0; i < 5; i++) {
            ans += Math.max(x[i] * 0.3, (1 - (m[i] / 250.0)) * x[i] - (50 * (w[i])));
        }

        ans += suc * 100;
        ans -= wrong * 50;

        System.out.println((int)ans);
    }

}


import java.io.*;
import java.util.*;
public class Task1
{
	public static Scanner in=new Scanner(System.in);
	public static BufferedWriter wr=new BufferedWriter(new OutputStreamWriter(System.out));
	public static PrintStream out=new PrintStream(System.out);
	public static void main(String[] args){
		final int a=500,b=1000,c=1500,d=2000,e=2500;
		double m1=in.nextInt(),m2=in.nextInt(),m3=in.nextInt(),m4=in.nextInt(),m5=in.nextInt();
		double w1=in.nextInt(),w2=in.nextInt(),w3=in.nextInt(),w4=in.nextInt(),w5=in.nextInt();
		int hs=in.nextInt(),hu=in.nextInt();
		double ans1=(hs*100)-(hu)*50;
		double a1=Math.max(0.3*a,(1-m1/250)*a-50*w1);
		double a2=Math.max(0.3*b,(1-m2/250)*b-50*w2);
		double a3=Math.max(0.3*c,(1-m3/250)*c-50*w3);
		double a4=Math.max(0.3*d,(1-m4/250)*d-50*w4);
		double a5=Math.max(0.3*e,(1-m5/250)*e-50*w5);
		double fin=a1+a2+a3+a4+a5+ans1;
		out.println((int)fin);

	}

}


import java.io.*;
import java.util.*;
public class Task1
{
	public static Scanner in=new Scanner(System.in);
	public static BufferedWriter wr=new BufferedWriter(new OutputStreamWriter(System.out));
	public static PrintStream out=new PrintStream(System.out);
	public static void main(String[] args){
		final int a=500,b=1000,c=1500,d=2000,e=2500;
		double m1=in.nextInt(),m2=in.nextInt(),m3=in.nextInt(),m4=in.nextInt(),m5=in.nextInt();
		double w1=in.nextInt(),w2=in.nextInt(),w3=in.nextInt(),w4=in.nextInt(),w5=in.nextInt();
		int hs=in.nextInt(),hu=in.nextInt();
		double ans1=(hs*100)-(hu)*50;
		double a1=Math.max(0.3*a,(1-m1/250)*a-50*w1);
		double a2=Math.max(0.3*b,(1-m2/250)*b-50*w2);
		double a3=Math.max(0.3*c,(1-m3/250)*c-50*w3);
		double a4=Math.max(0.3*d,(1-m4/250)*d-50*w4);
		double a5=Math.max(0.3*e,(1-m5/250)*e-50*w5);
		int fin=(int) ((int)a1+a2+a3+a4+a5+ans1);
		out.println(fin);

	}

}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int[] points = {500, 1000, 1500, 2000, 2500};
            int[] minutes = new int[5];
            int[] wa = new int[5];
            int k = 0;
            for (int i = 0; i < 5; ++i) minutes[i] = in.nextInt();
            for (int i = 0; i < 5; ++i) wa[i] = in.nextInt();
            int sh = in.nextInt(), uh = in.nextInt();
            int res = 0;
            for (int i = 0; i < 5; ++i) res += formula(minutes[i], wa[i], points[i]);
            res += 100 * sh;
            res -= 50 * uh;
            out.println(res);
        }

        private int formula(int minute, int wa, int points) {
            return (int) Math.ceil(Math.max(0.3 * points, (1 - (double) minute / 250) * (double) points - 50 * wa));
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int[] points = {500, 1000, 1500, 2000, 2500};
            int[] minutes = new int[5];
            int[] wa = new int[5];
            int k = 0;
            for (int i = 0; i < 5; ++i) minutes[i] = in.nextInt();
            for (int i = 0; i < 5; ++i) wa[i] = in.nextInt();
            int sh = in.nextInt(), uh = in.nextInt();
            int res = 0;
            for (int i = 0; i < 5; ++i) res += formula(minutes[i], wa[i], points[i]);
            res += 100 * sh;
            res -= 50 * uh;
            out.println(res);
        }

        private int formula(int minute, int wa, int points) {
            return Math.max(3 * points / 10, (250 - minute) * points / 250 - 50 * wa);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}


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);
    }

}


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();
         double 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((int)ans);
    }

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {

    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pr = new PrintWriter(System.out);
        String tokens[];
        tokens = br.readLine().split("\\s+");

        int[] scores = {500, 1000, 1500, 2000, 2500};
        int[] time = new int[tokens.length];
        for (int i = 0; i < tokens.length; ++i)
            time[i] = Integer.parseInt(tokens[i]);

        tokens = br.readLine().split("\\s+");
        int[] wrongSub = new int[tokens.length];
        for (int i = 0; i < tokens.length; ++i)
            wrongSub[i] = Integer.parseInt(tokens[i]);

        tokens = br.readLine().split("\\s+");
        int[] hacks = new int[tokens.length];
        for (int i = 0; i < tokens.length; ++i)
            hacks[i] = Integer.parseInt(tokens[i]);

        int sum = 0;
        for (int i = 0; i < 5; ++i) {
            //pr.println(sum);
            sum+=Math.max(3*scores[i]/10,(250-time[i])*scores[i]/250-50*wrongSub[i]);
        }
        int hackSum = 0;
        for (int i = 0; i < hacks.length; ++i)
            if (hacks[i] > 0)
                sum += 100 * hacks[i];
            else
                sum -= 50 * hacks[i];

        pr.println(sum);
        pr.flush();
        pr.close();

    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception{
        Scanner in=new Scanner(System.in);
        int[] time=new int[10];
        int[] wrongSub=new int[10];

        for(int i=0;i<5;i++)
            time[i]=in.nextInt();
        for(int i=0;i<5;i++)
            wrongSub[i]=in.nextInt();

        int[] scores = {500, 1000, 1500, 2000, 2500};
        int sum = 0;
        for (int i = 0; i < 5; ++i) {
            //pr.println(sum);
            sum+=Math.max(3*scores[i]/10,(250-time[i])*scores[i]/250-50*wrongSub[i]);
        }
        sum+=100*in.nextInt();
        sum-=50*in.nextInt();
        System.out.println(sum);

    }
}


import java.io.*;
import java.util.*;

public class Solution {

	public static void main(String args[]) {

		Scanner in;
		try {
			in = new Scanner(new File("input.txt"));
		} catch (Exception e) {
			in = new Scanner(System.in);
		}

		int[] ms = new int[5];
		int[] ws = new int[5];

		for (int i = 0; i < 5; ++i) {
			ms[i] = in.nextInt();
		}
		for (int i = 0; i < 5; ++i) {
			ws[i] = in.nextInt();
		}

		int s = in.nextInt();
		int u = in.nextInt();

		int res = 0;
		int score = 500;
		for (int i = 0; i < 5; ++i) {
			int thisRes = (int) Math.round(Math.max(0.3*score,(1 - ms[i]/250.0)*score - 50*ws[i]));
			System.out.println(thisRes);
			res += thisRes;
			score += 500;
		}

		res += s * 100;
		res -= u * 50;

		System.out.println(res);
	}
}


import java.io.*;
import java.util.*;

public class Solution {

	public static void main(String args[]) {

		Scanner in;
		try {
			in = new Scanner(new File("input.txt"));
		} catch (Exception e) {
			in = new Scanner(System.in);
		}

		int[] ms = new int[5];
		int[] ws = new int[5];

		for (int i = 0; i < 5; ++i) {
			ms[i] = in.nextInt();
		}
		for (int i = 0; i < 5; ++i) {
			ws[i] = in.nextInt();
		}

		int s = in.nextInt();
		int u = in.nextInt();

		int res = 0;
		int score = 500;
		for (int i = 0; i < 5; ++i) {
			int thisRes = (int) Math.round(Math.max(0.3*score,(1 - ms[i]/250.0)*score - 50*ws[i]));
			res += thisRes;
			score += 500;
		}

		res += s * 100;
		res -= u * 50;

		System.out.println(res);
	}
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class CodeForces
{
	public static void main(String[] args)
	{
		Scanner input = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

		int m1 = input.nextInt();
		int m2 = input.nextInt();
		int m3 = input.nextInt();
		int m4 = input.nextInt();
		int m5 = input.nextInt();

		int w1 = input.nextInt();
		int w2 = input.nextInt();
		int w3 = input.nextInt();
		int w4 = input.nextInt();
		int w5 = input.nextInt();

		int hs = input.nextInt();
		int hu = input.nextInt();

		int sum = 0;
		sum += Math.max(0.3 * 500, (1 - m1 / 250.0) * 500 - 50 * w1);
		sum += Math.max(0.3 * 1000, (1 - m2 / 250.0) * 1000 - 50 * w2);
		sum += Math.max(0.3 * 1500, (1 - m3 / 250.0) * 1500 - 50 * w3);
		sum += Math.max(0.3 * 2000, (1 - m4 / 250.0) * 2000 - 50 * w4);
		sum += Math.max(0.3 * 2500, (1 - m5 / 250.0) * 2500 - 50 * w5);
		sum += (hs * 100);
		sum -= (hu * 50);
		System.out.println(sum);
	}
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class CodeForces
{
	public static void main(String[] args)
	{
		Scanner input = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

		int m1 = input.nextInt();
		int m2 = input.nextInt();
		int m3 = input.nextInt();
		int m4 = input.nextInt();
		int m5 = input.nextInt();

		int w1 = input.nextInt();
		int w2 = input.nextInt();
		int w3 = input.nextInt();
		int w4 = input.nextInt();
		int w5 = input.nextInt();

		int hs = input.nextInt();
		int hu = input.nextInt();

		int sum = 0;
		sum += Math.max(75 * 500, (250 - m1) * 500 - 12500 * w1);
		sum += Math.max(75 * 1000, (250 - m2) * 1000 - 12500 * w2);
		sum += Math.max(75 * 1500, (250 - m3) * 1500 - 12500 * w3);
		sum += Math.max(75 * 2000, (250 - m4) * 2000 - 12500 * w4);
		sum += Math.max(75 * 2500, (250 - m5) * 2500 - 12500 * w5);
		sum /= 250;
		sum += (hs * 100);
		sum -= (hu * 50);
		System.out.println(sum);
	}
}


import java.util.Scanner;
public class something
{
    public static void main(String[]args)
    {
        Scanner scan=new Scanner(System.in);
        int[]m=new int[5];
        int[]w=new int[5];
        for(int i=0;i<5;i++)
            m[i]=scan.nextInt();
        for(int i=0;i<5;i++)
            w[i]=scan.nextInt();
        int s=scan.nextInt();
        int u=scan.nextInt();
        int[] subs=new int[5];
        for(int i=0;i<5;i++)
            subs[i]=Math.max(150*(i+1),500*(i+1)-2*m[i]*(i+1)-50*w[i]);
        int totsubs=subs[0]+subs[1]+subs[2]+subs[3]+subs[4];
        int score=totsubs+100*s-50*u;
        System.out.println(score);
        System.out.println(subs[0]+" "+subs[1]+" "+subs[2]+" "+subs[3]+" "+subs[4]);
    }
}


import java.util.Scanner;
public class something
{
    public static void main(String[]args)
    {
        Scanner scan=new Scanner(System.in);
        int[]m=new int[5];
        int[]w=new int[5];
        for(int i=0;i<5;i++)
            m[i]=scan.nextInt();
        for(int i=0;i<5;i++)
            w[i]=scan.nextInt();
        int s=scan.nextInt();
        int u=scan.nextInt();
        int[] subs=new int[5];
        for(int i=0;i<5;i++)
            subs[i]=Math.max(150*(i+1),500*(i+1)-2*m[i]*(i+1)-50*w[i]);
        int totsubs=subs[0]+subs[1]+subs[2]+subs[3]+subs[4];
        int score=totsubs+100*s-50*u;
        System.out.println(score);
    }
}


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

public class P604A {

    public static void main(String[] args) throws IOException {
        int[] m = new int[5];
        int[] w = new int[5];
        int[] h = new int[2];
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
                for(int i = 0; i < 5; i++)
                {
                    m[i] = Integer.parseInt(st.nextToken());
                }
                st = new StringTokenizer(br.readLine());
                for(int i = 0; i < 5; i++)
                {
                    w[i] = Integer.parseInt(st.nextToken());
                }
                st = new StringTokenizer(br.readLine());
                for(int i = 0; i < 2; i++)
                {
                    h[i] = Integer.parseInt(st.nextToken());
                }
        int[] x = {500, 1000, 1500, 2000, 2500};
        double score = 0;
        for(int i = 0; i < 5; i++)
        {
            score = score + Math.max((double)(0.3*x[i]), ((1 - (double)m[i]/250)*x[i] - (double)50*w[i]));
            System.out.println(score);
        }
        score = score + (100*h[0]) - (50*h[1]);
        System.out.println((int)score);
    }

}


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

public class P604A {

    public static void main(String[] args) throws IOException {
        int[] m = new int[5];
        int[] w = new int[5];
        int[] h = new int[2];
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
                for(int i = 0; i < 5; i++)
                {
                    m[i] = Integer.parseInt(st.nextToken());
                }
                st = new StringTokenizer(br.readLine());
                for(int i = 0; i < 5; i++)
                {
                    w[i] = Integer.parseInt(st.nextToken());
                }
                st = new StringTokenizer(br.readLine());
                for(int i = 0; i < 2; i++)
                {
                    h[i] = Integer.parseInt(st.nextToken());
                }
        int[] x = {500, 1000, 1500, 2000, 2500};
        double score = 0;
        for(int i = 0; i < 5; i++)
        {
            score = score + Math.max((double)(0.3*x[i]), ((1 - (double)m[i]/250)*x[i] - (double)50*w[i]));
            //System.out.println(score);
        }
        score = score + (100*h[0]) - (50*h[1]);
        System.out.println((int)score);
    }

}


import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		try (Scanner scan = new Scanner(System.in)) {

			double[] point = {500,1000,1500,2000,2500};
			double[] min = new double[5];
			double[] w = new double[5];
			for (int i=0;i<5;i++)min[i]=scan.nextDouble();
			for (int i=0;i<5;i++)w[i]=scan.nextDouble();
			double hs = scan.nextDouble();
			double hu = scan.nextDouble();

			int ans = 0;
			for (int i=0;i<5;i++){
				ans += Math.max(.3*point[i], (1.-min[i]/250)*point[i] - 50*w[i]);
			}
			ans+=100*hs;
			ans-=50*hu;
			System.out.println((int)Math.round(ans));

		}
	}
}


import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		try (Scanner scan = new Scanner(System.in)) {

			double[] point = {500,1000,1500,2000,2500};
			double[] min = new double[5];
			double[] w = new double[5];
			for (int i=0;i<5;i++)min[i]=scan.nextDouble();
			for (int i=0;i<5;i++)w[i]=scan.nextDouble();
			double hs = scan.nextDouble();
			double hu = scan.nextDouble();

			double ans = 0;
			for (int i=0;i<5;i++){
				ans += Math.max(.3*point[i], (1.-min[i]/250)*point[i] - 50*w[i]);
			}
			ans+=100*hs;
			ans-=50*hu;
			System.out.println((int)Math.round(ans));

		}
	}
}


//package round_334;

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double []m = new double[6];
		double []w = new double[6];
		for (int i = 1; i < 6; i++) {
			m[i] = sc.nextDouble();
		}
		for (int i = 1; i < 6; i++) {
			w[i] = sc.nextDouble();
		}
		int sh = sc.nextInt();
		int uh = sc.nextInt();
		double res = 0;
		for (int i = 1; i <= 5; i++) {
			int tmp= i*500;
			res += Math.max(0.3*tmp, (1d-((double)m[i]/250d))*tmp-w[i]*50d);
		}
		System.out.println((long)(res+sh*100-uh*50));
		sc.close();
	}
}


//package round_334;

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int []m = new int[6];
		int []w = new int[6];
		for (int i = 1; i < 6; i++) {
			m[i] = sc.nextInt();
		}
		for (int i = 1; i < 6; i++) {
			w[i] = sc.nextInt();
		}
		int sh = sc.nextInt();
		int uh = sc.nextInt();
		long res = 0;

		for (int i = 1; i <= 5; i++) {
			int tmp= i*500;
			res += Math.max(0.3*tmp, (1-((double)m[i]/250d))*tmp-w[i]*50d);
		}
		System.out.println(Math.round(res)+sh*100-uh*50);
		sc.close();
	}
}