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