def arr_inp():
    return [int(x) for x in input().split()]


score = 0
m, w = arr_inp(), arr_inp()
hs, hu = map(int, input().split())

for i in range(5):
    x = (i + 1) * 500
    score += max(.3 * x, ((1 - (m[i] / 250)) * x) - (50 * w[i]))

score += 100 * hs - 50 * hu
print(int(score))
