m = map(int, raw_input().split(' '))
w = map(int, raw_input().split(' '))

x = [500, 1000, 1500, 2000, 2500]

h1, h2 = map(int, raw_input().split(' '))

ans = 0
for i in range(5):
    k = int(x[i] * 0.3) * 250
    c = (250 - m[i]) * x[i] - 50 * w[i] * 250
    ans += max(k, c)
ans /= 250
ans += h1 * 100 - h2 * 50
print ans


