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

	t = 0
	for i in range(0, 5):
		t += max(int(0.3*p[i]), 2*(i+1)*(250-m[i])-50*w[i])

	t += hs*100
	t -= hu*50

	print(t)


if __name__ == '__main__':
	main()

