m = map(int, raw_input().split())
w = map(int, raw_input().split())
s = [500,1000,1500,2000,2500]
hs, hu = map(int, raw_input().split())

cnt = 0
for i in range(0, 5):
	cnt += max(0.3*s[i], (1-(m[i]*1.0/250))*s[i] - 50*w[i])
cnt = int(cnt)
cnt += 100*hs - 50*hu
print cnt
