from math import *

def max(a, b):
	if a > b:
		return a
	else:
		return b
		
m = map(int, raw_input().split(' '))
w = map(int, raw_input().split(' '))
hs, hu = map(int, raw_input().split(' '))

print m
print w

score = [500, 1000, 1500, 2000, 2500]
t = 0.0

for i in range(len(score)):
	t += max(0.3*score[i], (1 - float(m[i]/250.0))*score[i] - 50*w[i])
	
t += 100*hs
t -= 50*hu

print int(t)