n = 5;
ans = 0;
x = [500,1000,1500,2000,2500]
t = map(int,raw_input().split())
w = map(int,raw_input().split())
hs,hf = map(int,raw_input().split())
for i in range(n):
	ans += (max((0.3*x[i]),(1.0-(1.0*t[i]/250.0))*x[i]-50.0*w[i]))
print (int)(ans) + 100*hs - 50*hf