R = lambda: map(int, raw_input().split())
m = R()
w = R()
h = R()
s = [500, 1000, 1500, 2000, 2500]

score = 0
for i in range(5):
    score += max(0.3 * s[i], (1 - m[i] / 250.0) * s[i] - 50.0 * w[i])

print int(score + (h[0] * 100.0) - (h[1] * 50.0))
