#include <stdio.h>

void main()
{
	const int n = 5;
	int w[n], i, hs, hf, x[n] = {500, 1000, 1500, 2000, 2500},  m[n];
	float sum = 0;
	for (i = 0; i < n; i++)
		scanf("%i", &m[i]);
	for (i = 0; i < n; i++)
		scanf("%i", &w[i]);
	scanf("%i", &hs);
	scanf("%i", &hf);
	for (i = 0; i < n; i++)
	{
		if ((0.3*x[i]) > ((1 - (1. * m[i])/250) * x[i] - 50 * w[i]))
			sum += 0.3*x[i];
		else
			sum += (1 -(1.*m[i])/250) * x[i] - 50 * w[i];
	}
	sum = sum + hs * 100 - hf * 50;
	printf("%f", sum);
}