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