scores = [500 * i for i in range(1, 6)]
minutes = map(int, input().split())
wrongs = map(int, input().split())
s, u = map(int, input().split())

total_score = 0
for minute, wrong, score in zip(minutes, wrongs, scores):
    total_score += max(0.3 * score, (1 - minute / 250) * score - 50 * wrong)

print(int(total_score + 100 * s - 50 * u))
