a=[]
i=0
while i<2:
    b=input().split()
    a.append(b)
    i=i+1
w=[500,1000,1500,2000,2500]
i=0
result=0
y=input().split()
result=result+100*int(y[0])
result=result-50*int(y[1])
while i<5:
    c=0.3*w[i]
    d=(1-int(a[0][i])/250)*w[i]-50*int(a[1][i])
    result=result+max(c,d)
    i=i+1
print(int(result))


