time = list(map(int, input().split()))
tryes = list(map(int, input().split()))
luck, fail = map(int, input().split())
data = [500, 1000, 1500, 2000, 2500]
answer = 0
for i in range(5):
    answer += max(0.3 * data[i], (1 -  time[i] / 250) * data[i] - 50 * tryes[i])
answer += luck * 100
answer -= fail * 50
print(int(answer))