time = [int(i) for i in raw_input().split()]
wrong = [int(i) for i in raw_input().split()]
maxa = [500, 1000, 1500, 2000, 2500]

hs, hu = map(int, raw_input().split())
score = 0

for i in range(5):
	add = max(3 * maxa[i]/10, float(250 - time[i])/250 * maxa[i] - 50 * wrong[i])
	#print add
	score += add
	
score += (hs * 100)
score -= (hu * 50)

print int(score) 
