lm = map(int, input().split())
lw = map(int, input().split())
hs, hu = map(int, input().split())

score = 0.0
for m, w, x in zip(lm, lw, [500.0, 1000.0, 1500.0, 2000.0, 2500.0]):
    score += max(0.3 * x, (1 - m / 250.0) * x - 50.0 * w)

print(round(score) + 100 * hs - 100 * hu)
