

m = map(float, raw_input().split())
w = map(float, raw_input().split())
success, unsuccess = map(float, raw_input().split())

print 'm', m, 'w', w
score = float(0)
x = [500, 1000, 1500, 2000, 2500]
def problem_score(x,m,w):
    first = .3 * x
    tmpm = float(m/250)
    tmpm = float(1 - tmpm)
    second = float((tmpm * x) - (50 * w))
    return max(first, second)

for i in range(5):
    score += problem_score(x[i], m[i], w[i])

score -= (unsuccess*50)
score += (success*100)
print int(score)
