m = list(map(int,input().split()))
x = [500,1000,1500,2000,2500]
w = [int(i) for i in input().split()]
h1,h2 = map(int,input().split())
cnt = 0

for i in range(5):
	cnt+=max(0.3*x[i],((1-(m[i]/250))*x[i]-50*w[i]))

print(int(cnt)+h1*100-h2*50)