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