m = list(map(int, input().split()))
w = list(map(int, input().split()))
s, u = map(int, input().split())

score = 0
for mi, wi, x in zip(m, w, [500, 1000, 1500, 2000, 2500]):
    score += max(.3 * x, (1 - mi / 250) * x - 50 * wi)
score += 100 * s
score -= 50 * u
print(int(score))
