m=[int(x) for x in raw_input().split()]
w=[int(x) for x in raw_input().split()]
n1,r1=raw_input().split()
n=int(n1);r=int(r1);s=0
for i in range(5):
    s+=max(150*(i+1),500*(i+1)-(2*(i+1)*m[i])-50*w[i])
s=s+(100*n)-50*(r)
print s