def max(x, m, w):
    a=0.3*x
    b=(1-m/250)*x-50*w
    if a>=b:
        return a
    else:
        return b
st = input().split()
ws = input().split()
h = input().split()
x = [500, 1000, 1500, 2000, 2500]
total=0
for i in range(len(st)):
    total+=max(x[i], int(st[i]), int(ws[i]))
total += 100*int(h[0])-50*int(h[1])
print("{0:.0f}".format(total))