minutes = input().split()
tries = input().split()
good_bad = input().split()

s = 0

for i in range(len(minutes)):
	if i == 0:
		s += max(0.3 * 500, (1 - int(minutes[0])/250)*500 - 50*int(tries[0]))
	elif i == 1:
		s += max(0.3 * 1000, (1 - int(minutes[1])/250)*1000 - 50*int(tries[1]))
	elif i == 2:
		s += max(0.3 * 1500, (1 - int(minutes[2])/250)*1500 - 50*int(tries[2]))
	elif i == 3:
		s += max(0.3 * 2000, (1 - int(minutes[3])/250)*2000 - 50*int(tries[3]))
	elif i == 4:
		s += max(0.3 * 2500, (1 - int(minutes[4])/250)*2500 - 50*int(tries[4]))
s += int(good_bad[0]) * 100
s -= int(good_bad[1]) * 50

print(int(s))
	
	
