N = 5
ps = [500, 1000, 1500, 2000, 2500]
p_s, p_u = 100, -50

ms = list(map(int, input().split()))
ws = list(map(int, input().split()))
h_s, h_u = map(int, input().split())

r = 0
for i in range(N):
    r += max(0.3 * ps[i], (1 - ms[i] / 250) * ps[i] - 50 * ws[i])

r += h_s * p_s
r += h_u * p_u

print(int(r))
