arr =[500, 1000, 1500, 2000, 2500]

mi = list(map(int,raw_input().split()))
wa = list(map(int,raw_input().split()))
x = 0
for i in range(5):
	y = max(0.3*arr[i],((250-mi[i])/250.0)*arr[i]-50*wa[i])
	x+=y
hs,hu = map(int,raw_input().split())
x=x+hs*100-hu*50
print(int(x))
