p = [500, 1000, 1500, 2000, 2500]
m = map(int, raw_input().split(" "))
w = map(int, raw_input().split(" "))
hs, hu = map(int, raw_input().split(" "))

ans = 0
for i in range(5):
    x = p[i]
    ans += max(int(0.3 * x), x - m[i] * x / 250 - 50 * w[i])
ans += 100 * hs - 50 * hu
print ans
