M = map(int,raw_input().split())
W = map(int,raw_input().split())
X = [500, 1000, 1500, 2000, 2500]
HS,HU = map(int,raw_input().split())
total = 0
for i in xrange(5) :
	total+=max(0.3*X[i],(X[i] - (X[i]*M[i])/250 - 50*W[i]))
total = total + HS*100 - HU*50
print total
