m=list(map(int,input().split()))
w=list(map(int,input().split()))
a,b=(map(int,input().split()))
ans=0
ans+=(a*100)-(50*b)
for i in range(1,6):
    x=500*i;
    y=0.3*x;
    z=(1-(m[i-1]/250))*x-50*w[i-1];
    ans+=max(y,z);
print(int(ans))