scores = [500, 1000, 1500, 2000, 2500]
times  = [int(i) for i in raw_input().split(" ")]
wrong = [int(i) for i in raw_input().split(" ")]
hs,hu  = tuple(int(i) for i in raw_input().split(" "))

def calc(sc, m, w):
    return max(sc * 250 * 3, 10 * (((250 - m) * sc) - 250 * 50 * w))

s = 0
for i in range(5):
    s += calc(scores[i], times[i], wrong[i])

s /= 2500

s += hs * 100
s -= hu * 50

print s
