def scanf():
    inp = list(map(int, input().split(' ')))
    if len(inp) == 1:
        return inp[0]
    return inp


m = scanf()
wa = scanf()
sh, uh = scanf()
score = sh * 100 + uh * (-50)
x = [500, 1000, 1500, 2000, 2500]
for i in range(5):
    score += (max((0.3 * x[i]), ((1-m[i]/250)*x[i]) - 50*wa[i]))

print(int(score))
