
if __name__ == '__main__':
	#print 'hello'
	time_list=[]
	sub_list=[]
	mark_list = [500,1000,1500,2000,2500]
	x = raw_input()
	time_list = [int(i) for i in x.split()]
	x = raw_input()
	sub_list = [int(i) for i in x.split()]
	x = raw_input()
	suc_hack = int(x.split()[0])
	unsuc_hack = int(x.split()[1])
	sum_1=0
	for i in xrange(5):
		t = ((1-(float(time_list[i])/250))*mark_list[i])-(50*sub_list[i])
		#print t
		sum_1 = sum_1 + max(0.3*mark_list[i], t)
	sum_1 = sum_1 + suc_hack*100 - unsuc_hack*50
	print int(sum_1)
