def n():
    return list(map(int, input().split()))           
m, w, h, r, p = n(), n(), n(), 0, [500,1000,1500,2000,2500]
for i in range(5):
    r += max(0.3*p[i], (1-m[i]/250)*p[i] - 50*w[i])
r += h[0] * 100 - h[1] * 50
print(int(r))
