def com(x,m,w):
	a = (1.0-(float(m)/250.0))*x - 50*w
	return max(0.3*x,a)

if __name__ == '__main__':
	m = raw_input()
	w = raw_input()
	h = raw_input()
	m = m.split()
	w = w.split()
	h = h.split()
	m = [int(x) for x in m]
	w = [int(x) for x in w]
	h = [int(x) for x in h]
	score =  [500, 1000, 1500, 2000,2500]
	new_score = []
	for i in xrange(0,5): new_score.append(com(score[i],m[i],w[i]))
	print int(sum(new_score)+ 100*h[0]- 50*h[1])
