m = [int(i) for i in input().split()]
w = [int(i) for i in input().split()]
hs, hw = map(int, input().split())
r = 50 * (2 * hs - hw)
for i in range(5):
    wt = (i + 1) * 500
    r += max(3 * wt // 10, (250 - m[i]) * wt // 250 - 50 * w[i])
print(r)