costs = [500, 1000, 1500, 2000, 2500]
m = list(map(int, input().strip().split()))
w = list(map(int, input().strip().split()))
hs, hu = map(int, input().strip().split())

ans = 0
for x, mi, wi in zip(costs, m, w):
    ans += max(
        0.3*x,
        (1 - mi/250)*x - 50*wi
    )

ans += 100*hs
ans -= 50*hu

print(int(ans))
