m=map(int,raw_input().split(' '))
w=map(int,raw_input().split(' '))
ans=0
x=[500,1000,1500,2000,2500]
for i in range(5):
    a=0.3*x[i]
    b=(1.0-m[i]/250.0)*x[i]-(50*w[i])
    if a>b:
        ans+=a
    else:
        ans+=b
a,b=map(int,raw_input().split(' '))
ans+=a*100-b*50
print int(ans)
