m = map(int,raw_input().split())
w = map(int,raw_input().split())
h = map(int,raw_input().split())

x = [500, 1000, 1500, 2000,2500]
#print m
#print w
#print x
s=0
for i in range(5):
	m1=0.3*x[i]
	cof=(1.0-(m[i]/250.0))
	m2=(cof*x[i] )-(50*w[i])
	#print m2
	s+=max(m1,m2)
#print s
for i in range(h[0]):
	s+=100
for i in range(h[1]):
	s-=50
print int(s)