m = raw_input()
m = list([int(i) for i in m.split()])
i = raw_input()
i = list([int(x) for x in i.split()])
h = raw_input()
h = list([int(j) for j in h.split()])
#m = [20, 40, 60, 80, 100]
#i = [0, 1, 2, 3, 4]
#h = [1, 0]
p = [500, 1000, 1500, 2000, 2500] 
total = 0
for s in zip(m, i, p):
    total += max(s[2] - s[2]*s[0]/250-50*s[1],s[2]/10*3)
hacks = lambda x: (x[0] * 100) - (x[1] * 50)
total += hacks(h)
print int(total)

