x=[500,1000,1500,2000,2500]
m=map(int,raw_input().split())
w=map(int,raw_input().split())
h=map(int,raw_input().split())
score=0.0
for i in range(5):
    score+=max(0.3*x[i],(1.0-1.0*m[i]/250)*x[i]-50*w[i])
    
score+=100*h[0]-50*h[1]
print int(round(score))
            
        
        



