points = list(int(x) for x in input().split())

submission = list(int(x) for x in input().split())

rowHack = input().split()
successHack = int(rowHack[0])
unSuccessHack = int(rowHack[1])
maxPoints = [500,1000,1500,2000,2500]

res = [0,0,0,0,0]
for i in range(5):
    res[i] = max(0.3 * maxPoints[i],  (((1 - (points[i]/250))* maxPoints[i]) - (50 * submission[i]))     )

sumres = sum(res)

sumres = sumres + (100*successHack) - (50 * unSuccessHack)
print(int(sumres))




