def solve():
    m = [int(_) for _ in input().split()]
    w = [int(_) for _ in input().split()]
    h = [int(_) for _ in input().split()]

    score = 500
    total_points = 0

    for i in range(len(m)):
        total_points += max(0.3 * score, (1 - m[i] / 250) * score - (50 * w[i]))
        score += 500

    total_points += h[0] * 100
    total_points -= h[1] * 50

    print(int(total_points))

if __name__ == "__main__":
    solve()
