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

public class Kevin {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s[] = br.readLine().split(" ");
		int m[] = new int[5];

		for (int i = 0; i < 5; i++)
			m[i] = Integer.parseInt(s[i]);

		int w[] = new int[5];
		s = br.readLine().split(" ");

		for (int i = 0; i < 5; i++)
			w[i] = Integer.parseInt(s[i]);

		s = br.readLine().split(" ");
		int hs = Integer.parseInt(s[0]);
		int hu = Integer.parseInt(s[1]);

		float score = 0f;
		float min = 500f;

		for (int i = 0; i < 5; i++) {
			float f1 = 0.3f * min;
			float f2 = ((1 - 1f * m[i] / 250) * min) - (50 * w[i]);
			min += 500;

			score += Math.max(f1, f2);
		}

		score += hs * 100;
		score -= hu * 50;

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