
m=input().split()
w=input().split()
h=input().split()
x=[500,1000,1500,2000,2500]
res=0
for i in range(5):
	res+=max(3*int(x[i])/10,(1-int(m[i])/250)*int(x[i])-50*int(w[i]))
#print(res)

res+=100*int(h[0])
res-=50*int(h[1])
print(int(res))