time = map(int, raw_input().split(' '))
tries = map(int, raw_input().split(' '))
hacks = map(int, raw_input().split(' '))
limit = [500, 1000, 1500, 2000, 2500]

score = 0
for i in xrange(5):
    score += max(0.3 * limit[i], (1 - time[i]/250.0)*limit[i] - 50 * tries[i])

score += 100 * hacks[0] - 50 * hacks[1]

print int(score)
