x = [500, 1000, 1500, 2000, 2500]
m = str(input()).split()
w = str(input()).split()
h = str(input()).split()

m = [int(xx) for xx in m]
w = [int(ww) for ww in w]
h = [int(hh) for hh in h]


def problem_score(xx, mm, ww):
    score_a = 0.3 * xx
    score_b = (1 - mm/250)*xx - 50*ww
    return max(score_a, score_b)

score = 0
for i in range(0, len(m)):
    score += problem_score(x[i], m[i], w[i])
for i in range(0, h[0]):
    score += 100
for i in range(0, h[1]):
    score -= 50

print(int(score))
