Scores = [500, 1000, 1500, 2000, 2500]
Time = list(map(int, input().split()))
Wrong = list(map(int, input().split()))
SUM = 0
for i in range(5):
    SUM += max(0.3 * Scores[i], (1 - (Time[i] / 250)) * Scores[i] - (50 * Wrong[i]))
Hack = list(map(int, input().split()))
print(int(SUM + (Hack[0] * 100) - (Hack[1] * 50)))
