m = map(int,raw_input().split())
w = map(int,raw_input().split())
x = [500*(i+1) for i in range(5)]
s,u = map(int,raw_input().split())
ans = 50*(2*s-u)
for i in range(5):
	ans += max( 0.3*x[i], (1-m[i]/250.0)*x[i] - 50*w[i] )
print int(ans)