if __name__ == '__main__':
    parr = [500, 1000, 1500, 2000, 2500]
    marr = list(map(int, input().split()))
    warr = list(map(int, input().split()))

    s = 0

    for i in range(5):
        x = parr[i]
        m = marr[i]
        w = warr[i]
        s += max(0.3 * x, (((250 - m) * x) // 250) - (50 * w))

    hs, hu = map(int, input().split())

    s += 100 * hs
    s -= 50 * hu

    print(int(s))
