import sys

def solve(ms, ws, hs):
    total = 0
    scores = [500, 1000, 1500, 2000, 2500]

    for i in range(len(ms)):
        p1 = 75*scores[i]
        p2 = (250 - ms[i])*scores[i] - 250*50*ws[i]
        pmax = max(p1, p2)
        total += pmax

    total /= 250
    total += hs[0]*100 - hs[1]*50
    return total

if __name__=='__main__':
    lines = sys.stdin.readlines()
    ms = [int(v) for v in lines[0].strip().split()]
    ws = [int(v) for v in lines[1].strip().split()]
    hs = [int(v) for v in lines[2].strip().split()]

    print solve(ms, ws, hs)