
x=[500,1000,1500,2000,2500]
m=list(map(int,input().split()))
w=list(map(int,input().split()))
sh,uh=map(int,input().split())
t=0
for i in range(5):
        t+=max(0.3*x[i],(1-(m[i]/250))*x[i] -(50*w[i])) 

t += (sh*100) - (uh*50)
print(int(t))
    