m=map(int,raw_input().split())
w=map(int,raw_input().split())
s,us=map(int,raw_input().split())
v=[500,1000,1500,2000,2500]
ans=0
for i in range(5):
	ans+=(max(0.3*v[i],(1-m[i]/250.0)*v[i]-(50*w[i])))
ans+=(100*s)
ans-=(50*us)
print int(ans)
