c = [500,1000,1500,2000,2500]
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
k,l = [int(i) for i in input().split()]
ans = 0
for i in range(5):
	ans+=max(0.3*c[i],(1-a[i]/250)*c[i]-50*b[i])
ans+=100*k
ans-=50*l
print(int(ans))
