x = [500, 1000, 1500, 2000, 2500]
m = map(float, raw_input().split())
w = map(float, raw_input().split())
sh, uh = map(float, raw_input().split())

score = 0.000
for i in range(5):
    score += max(0.3 * x[i], (1.0 - m[i] / 250) * x[i] - 50 * w[i])

score += sh * 100
score -= uh * 50

print int(score)
