import sys

MAX_POINTS = (500, 1000, 1500, 2000, 2500)

times = [int(i) for i in sys.stdin.readline().rstrip().split(' ')]
wrong_submissions = [int(i) for i in sys.stdin.readline().rstrip().split(' ')]
good_hacks, bad_hacks = [int(i) for i in sys.stdin.readline().rstrip().split(' ')]

# times = [20, 40, 60, 80, 100]
# wrong_submissions = [0, 1, 2, 3, 4]
# good_hacks, bad_hacks = 1, 0

# times = [119, 119, 119, 119, 119]
# wrong_submissions = [0, 0, 0, 0, 0]
# good_hacks, bad_hacks = 10, 0


def get_score_for_problem(x, m, w):
    first = 0.3 * x #- (50 * w)
    second = (1 - m / 250.0) * x - (50 * w)
    return max(first, second)

total = 0
for i, minutes in enumerate(times):
    total += get_score_for_problem(MAX_POINTS[i], minutes, wrong_submissions[i])

total += good_hacks * 100
total -= bad_hacks * 50

print int(total)
