m=[int(i) for i in input().split()]
w=[int(i) for i in input().split()]
h=[int(i) for i in input().split()]
v,ans=[500,1000,1500,2000,2500],0
for x in range(5):
	ans=max(int(0.3*v[x]+0.00001),int((1-m[x]/250)*v[x]-50*w[x]+0.00001))+ans
ans=ans+100*h[0]-50*h[1]
print(ans)
