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


def problem_score(x, m, w):
    return max(75*x, (250-m)*x - 250*50*w)


def score(ms, ws, hs, hu):
    return (sum(problem_score(x, m, w)
                for x, m, w in zip(PROBLEMS, ms, ws))//250
            + 100*hs - 50*hu)


if __name__ == '__main__':
    m1, m2, m3, m4, m5 = map(int, input().split())
    w1, w2, w3, w4, w5 = map(int, input().split())
    hs, hu = map(int, input().split())
    print(score((m1, m2, m3, m4, m5), (w1, w2, w3, w4, w5), hs, hu))
