# m = raw_input("First line: ")
# w = raw_input("Second line: ")
# h = raw_input("Third line: ")

m = "119 119 119 119 119"
w = "0 0 0 0 0"
h = "10 0"

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

af = ((1-(float(m[0])/250))*500)-(50*float(w[0]))
bf = ((1-float(m[1])/250)*1000)-(50*float(w[1]))
cf = ((1-float(m[2])/250)*1500)-(50*float(w[2]))
df = ((1-float(m[3])/250)*2000)-(50*float(w[3]))
ef = ((1-float(m[4])/250)*2500)-(50*float(w[4]))

hack_s = 100*float(h[0])
hack_f = 50*float(h[1])

taska = max(150, af)
taskb = max(300, bf)
taskc = max(450, cf)
taskd = max(600, df)
taske = max(750, ef)

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

print int(result)