M = list(map(int, input().split()))
W = list(map(int, input().split()))
hs, hu = map(int, input().split())
X = [500, 1000, 1500, 2000, 2500]

ans = 0
for m, w, x in zip(M, W, X):
    ans += max(0.3 * x, (1 - m / 250) * x - 50 * w)
ans += hs * 100
ans -= hu * 50
print(int(ans))
