def calc_score(base, time, wrongs):
    return max(base // 10 * 3, base - base // 250 * time - 50 * wrongs)


def main():
    base_scores = [500, 1000, 1500, 2000, 2500]
    submission_times = [int(_) for _ in input().split()]
    wrong_submissions = [int(_) for _ in input().split()]
    hacks = [int(_) for _ in input().split()]

    score = \
        sum(calc_score(base_scores[i], submission_times[i], wrong_submissions[i]) for i in range(5)) + \
        hacks[0] * 100 - hacks[1] * 50
    print(score)


if __name__ == '__main__':
    main()
