m = list(map(int, input().split()))
w = list(map(int, input().split()))
hs, hu = map(int, input().split())
s = 0
for i in range(5):
	t = 500 * (i + 1)
	s += max(0.3 * t, (1 - m[i] // 250) * t - 50 * w[i])
s += hs * 100 - hu * 50
print(s)