# Kevin Sun has just finished competing in Codeforces Round #334!
# The round was 120 minutes long with five problems w maximum point values of 500, 1000, 1500, 2000, and 2500

# Kevin was uncowed and bulldozed through all of them
# Kevin knows : 
	# his submission time for each problem, 
	# the number of wrong submissions that he made on each problem, 
	# his total numbers of successful and unsuccessful hacks.
# Kevin wants you to write a program to compute his final score.

# Codeforces scores are computed as follows:

# If the maximum point value of a problem is x,and Kevin submitted correctly at min m but made w wrong submissions,
	# then his score on that problem is max(0)
# His total score is equal to the sum of his scores for each problem.

# Kevin's total score gets increased by 100 points for each successful hack, 
# but gets decreased by 50 points for each unsuccessful hack.

# All arithmetic operations are performed with absolute precision and no rounding. 
# It is guaranteed that Kevin's final score is an integer.

lastTimes = map(float, raw_input().split(' ')) # times when he got it right 
wrongSubmissions = map(float, raw_input().split(' ')) # num of wrong subs
sucunsuc = map(float, raw_input().split(' ')) # num of suc and unsuc hacks 

probOneScore = max([0.3 * 500, (1 - (lastTimes[0]/250)) * 500 - (50 * wrongSubmissions[0])])
probTwoScore = max([0.3 * 1000, (1 - (lastTimes[1]/250)) * 1000 - (50 * wrongSubmissions[1])])
probThreeScore = max([0.3 * 1500, (1 - (lastTimes[2]/250)) * 1500 - (50 * wrongSubmissions[2])])
probFourScore = max([0.3 * 2000, (1 - (lastTimes[3]/250)) * 2000 - (50 * wrongSubmissions[3])])
probFiveScore = max([0.3 * 2500, (1 - (lastTimes[4]/250)) * 2500 - (50 * wrongSubmissions[4])])
hacksScore = sucunsuc[0] * 100 - sucunsuc[1] * 50

print int(probOneScore + probTwoScore + probThreeScore + probFourScore + probFiveScore + hacksScore)