import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int m[] = new int[5];
		int w[] = new int[5];
		m[0] = scan.nextInt();
		m[1] = scan.nextInt();
		m[2] = scan.nextInt();
		m[3] = scan.nextInt();
		m[4] = scan.nextInt();
		w[0] = scan.nextInt();
		w[1] = scan.nextInt();
		w[2] = scan.nextInt();
		w[3] = scan.nextInt();
		w[4] = scan.nextInt();
		
		int hs = scan.nextInt();
		int hu = scan.nextInt();
		
		int Score = 0;
		
		for(int i = 0; i < 5; i++) {
			int x = 500+500*i;
			int max = 75*x;
			int temp = (250-m[i])*x-12500*w[i];
			if(temp > max) max = temp;
			Score += max;
		}
		
		Score = Score/250;
		Score = Score + 100*hs - 50*hu;
		
		System.out.println(Score);
	}

}