r=lambda:map(int,raw_input().split())

m=r()
w=r()
hs,hf=r()
x=[500,1000,1500,2000,2500]
S=0
for i in range(5):
   S += max(0.3 * x[i], (1-float(m[i])/250)*x[i]-50*w[i])
S+= 100*hs - 50*hf
print int(S)