def solve(submission_times, wrong_submissions, hacking_attempts):
    ans = 0
    points = [500, 1000, 1500, 2000, 2500]
    for x, m, w in zip(points, submission_times, wrong_submissions):
        ans += max(0.3 * x, (1 - m/250) * x - 50 * w)

    ans += 100 * hacking_attempts[0]
    ans -= 50 * hacking_attempts[1]
    return int(ans)


def main():
    m = [int(c) for c in input().split()]
    w = [int(c) for c in input().split()]
    h = [int(c) for c in input().split()]
    ans = solve(m, w, h)
    print(ans)

main()
