times = [int(x) for x in input().split()]
wrong = [int(x) for x in input().split()]
hacks = [int(x) for x in input().split()]
max_scores = [500, 1000, 1500, 2000, 2500]

total = 0
for i in range(len(max_scores)):
    total += max(0.3 * max_scores[i], (1 - times[i]/250) * max_scores[i] - 50 * wrong[i])
total += 100 * hacks[0]
total -= 50 * hacks[1]
print(int(total))