m=list(map(int,raw_input().strip().split(' ')))
w=list(map(int,raw_input().strip().split(' ')))
sums=0
x=[500,1000,1500,2000,2500]
for i in xrange(5):
	sums+=max(0.3*x[i],(1-m[i]/250.0)*(x[i])-50*w[i])
hs,hw=raw_input().strip().split(' ')
sums+=int(hs)*100-int(hw)*50
print int(sums)