m = raw_input()
w = raw_input()
h = raw_input()

m = m.split()
w = w.split()
h = h.split()

af = ((1.0-(float(m[0])/250.0))*500.0)-(50.0*float(w[0]))
bf = ((1.0-float(m[1])/250.0)*1000.0)-(50.0*float(w[1]))
cf = ((1.0-float(m[2])/250.0)*1500.0)-(50.0*float(w[2]))
df = ((1.0-float(m[3])/250.0)*2000.0)-(50.0*float(w[3]))
ef = ((1.0-float(m[4])/250.0)*2500.0)-(50.0*float(w[4]))

hack_s = 100.0*float(h[0])
hack_f = 50.0*float(h[1])

taska = max(150.0, af)
taskb = max(300.0, bf)
taskc = max(450.0, cf)
taskd = max(600.0, df)
taske = max(750.0, ef)

result = taska+taskb+taskc+taskd+taske+hack_s-hack_f

print int(result)