read = lambda: map(int, input().split())
f = lambda x, m, w: max(0.3 * x, (1 - m / 250) * x - 50 * w)
x = [500 * i for i in range(1, 6)]
m = list(read())
w = list(read())
hs, hu = read()

ans = sum(f(x[i], m[i], w[i]) for i in range(5)) + hs * 100 - hu * 50
print(int(ans))
