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