S = [500, 1000, 1500, 2000, 2500]
M = list(map(int,input().split()))
W = list(map(int,input().split()))
H, F = map(int, input().split())

an = 0

for i in range(5):
    x = S[i]
    m = M[i]
    w = W[i]
    an += max(0.3 * x, ( 1 - m / 250) * x - 50 * w)

an += H * 100 - F * 50
print(int(an))