m=[int(x)for x in input().split()]
w=[int(x)for x in input().split()]
s,u=map(int,input().split())
ans=0
for i in range(5):
    x=(500*(i+1))
    ans+=max(0.3*x,((1-(m[i]/250))*x-(50*w[i])))
print(int(ans)+(100*s)-(50*u))