m = map(int, raw_input().split())
w = map(int, raw_input().split())
h = map(int, raw_input().split())


def calc(x, m, w):
    return max(0.3 * x, (1 - 1.0 * m / 250) * x - 50 * w)


total = 0
for i in xrange(1, 6):
    total += calc(i * 500, m[i - 1], w[i - 1])

total += 100 * h[0] - 50 * h[1]

print int(total)
