m = list(map(int, input().split()))
w = list(map(int, input().split()))
hs, hu = map(int, input().split())
x = [500, 1000, 1500, 2000, 2500]
def f(m, w, x):
	return max(0.3*x,(1-m/250)*x-50*w)
sol = 0
for i in range(5):
	sol += f(m[i], w[i], x[i])
sol += 100*hs-50*hu
sol = int(sol)
print(sol)
