M = map(int, raw_input().split())
W = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())


X = [500, 1000, 1500, 2000, 2500]

score = 0
for i in xrange(5):
    score += max(0.3*X[i], ( (1-(M[i]/250.0)) * X[i] - 50 * W[i] ) )

score += hs*100
score -= hu*50

print int(score)
