from sys import stdin

times = stdin.readline().rstrip().split(' ')
times = [int(t) for t in times]
wrong_submissions = stdin.readline().rstrip().split(' ')
wrong_submissions = [int(t) for t in wrong_submissions]
hacks = stdin.readline().rstrip().split(' ')
hacks = [int(t) for t in hacks]


score = 100*hacks[0] - 50*hacks[1]

for i in range(5):
	x = 500*(i+1)
	score += max(0.3*x, (1 - times[i]/250)*x - 50*wrong_submissions[i])

print(int(score))
