m = list(map(int, input().strip().split()))[:5]
w= list(map(int,input().strip().split()))[:5]
hs,hu=map(int,input().split())
i=0
x=500
ans=0
while x<=2500:
    ans+=max(0.3*x,(1-float(m[i]/250))*x-(50*w[i]))
    i+=1
    x+=500
ans+=(hs*100)-(hu*50)
print(ans)