a=[float(x) for x in raw_input().split()]
b=[float(x) for x in raw_input().split()]
sh,uh= [float(x) for x in raw_input().split()] 
score=0
for i in range(5):
    l= 500*(i+1)
    x=0.3*l
    y=(1-a[i]/250.0)*l-50*b[i]
    score+=max(x,y)
score+=100*sh-50*uh
print int(score)
