m=[int(y) for y in input().split()]
v=[int(y) for y in input().split()]
a,b=[int(y) for y in input().split()]
ans=0
score=500
d=0
for i in range(1, 6, 1):
    d=(1-(m[i-1]/250))*(score*i)-(50*v[i-1])
    if (d+1)-int(d)>=1.5:
        d=int(d+1)
    ans+=int(max(0.3*(i*score),d))
ans+=(a*100)
ans-=(b*50)
print(ans)
  	 		   		 	  				 				 		   	