def compute(m, w, nr, nw):
	s = 0
	sc = [500, 1000, 1500, 2000, 2500]
	for i in range(len(m)):
		s += max(0.3*sc[i], (1-(m[i]/250.0))*sc[i] - 50*w[i])

	s += 100*nr
	s -= 50*nw
	return s

m = map(int, raw_input().split())
w = map(int, raw_input().split())
nr, nw = map(int, raw_input().split())
print int(compute(m,w,nr,nw))