
Input=lambda:map(int,input().split())

m = list(Input())
w = list(Input())
h = list(Input())
x = [500, 1000, 1500, 2000, 2500]
Score = (h[0]*100) - (h[1]*50)
for i in range(5):
    Score+=max(0.3*x[i],(1-(m[i]/250))*x[i]-(50*w[i]) )

print(int(Score))