m = [int(i) for i in input().split()]
w = [int(i) for i in input().split()]
hs, hu = [int(i) for i in input().split()]
x = [500 * i for i in range(1, 6)]
ans = 0.0
for i in range(5):
    ans += max(0.3 * x[i], (1 - (m[i] / 250)) * x[i] - 50 * w[i])
ans += 100 * hs - 50 * hu
print(int(ans))
