z=[int(n) for n in input().split()]
rr=[500,1000,1500,2000,2500]
s=[int(n) for n in input().split()]
op=[int(n) for n in input().split()]
l=0
for n in range(len(z)):
  t=0.3*rr[n]
  p=(1-(z[n]/250))*rr[n]-50*s[n]
  l+=max(t,p)
l+=op[0]*100
l-=op[1]*50
print(int(l))