m=[int(i) for i in raw_input().split()]
w=[int(i) for i in raw_input().split()]
v=[500,1000,1500,2000,2500]
s,u=(int(i) for i in raw_input().split())
ans=100*s-50*u
for i in range(0,5):
    ans+=max(0.3*v[i],(1.0-m[i]/250.0)*(v[i]+0.0)-50.0*w[i])
print int(ans)