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








