def main():
	m = list(map(int, input().split()))
	w = list(map(int, input().split()))
	hs, hu = (map(int, input().split())) 
	score = [500, 1000, 1500, 2000, 2500]

	total = 0

	for i in range(5):
		total += max(0.3 * score[i], (1 - (m[i] / 250)) * score[i] - 50 * w[i])
	total += (2 * hs - hu) * 50

	print(int(total))

if __name__ == '__main__':
	main()