xs = [500, 1000, 1500, 2000, 2500]
ms = [int(i) for i in input().split()]
ws = [int(i) for i in input().split()]
h1, h2 = map(int,input().split())
r = 0
for i in range(5):
    x, m, w = xs[i], ms[i], ws[i]
    r += max(x*0.3, (1-m/250)*x - 50*w)
print(int(r + 100*h1 - 50*h2))
