m=[int(i) for i in input().split()]
w=[int(i) for i in input().split()]
hp,hf=map(int,input().split())
sm=0 
x=[500,1000,1500,2000,2500]
for i in range(5):
    sm+=max(x[i]*(0.3),(1-m[i]/250)*x[i]-50*w[i])
sm+=hp*100 
sm-=hf*50 
print(int(sm))