totalScore = 0

minutes = list(map(int, input().split()))
wrongs = list(map(int, input().split()))
hack1, hack2 = map(int, input().split())
x = [500, 1000, 1500, 2000, 2500]


for i in range(5):
    buffer = max((0.3*x[i]), ((1-(minutes[i]/250))*x[i])-(50*wrongs[i]))
    totalScore += buffer


totalScore += (hack1*100)
totalScore -= (hack2*50)

print(int(totalScore))
