a, b, c, d, e = map(int, input().split())
w_a, w_b, w_c, w_d, w_e = map(int, input().split())
succ_hack, fail_hack = map(int, input().split())

res = 0
res += max(0.3 * 500, (1 - a/250) * 500  - 50 * w_a)
res += max(0.3 * 1000, (1 - b/250) * 1000  - 50 * w_b)
res += max(0.3 * 1500, (1 - c/250) * 1500  - 50 * w_c)
res += max(0.3 * 2000, (1 - d/250) * 2000  - 50 * w_d)
res += max(0.3 * 2500, (1 - e/250) * 2500  - 50 * w_e)
res += succ_hack * 100
res -= fail_hack * 50

print ((int)(res))
