times = map(float, raw_input().split())
wrong = map(int, raw_input().split())
score = 0
for i in range(1, 6):
    x = 500 * i
    score += max(0.3 * x, (1 - (times[i-1]/250)) * x - 50 * wrong[i-1])

right, wrong = map(int, raw_input().split())
print int(score + 100 * right - 50 * wrong)

