difficulties, goal = list(map(int, input().split()))



pcs = [list(map(int, input().split())) for _ in range(difficulties)]



dp = [[0] * 1102 for _ in range(difficulties + 1)]



total_problem = 0

for d, pc in enumerate(pcs, 1):

    problem, complete = pc

    total_problem += problem



    score = {x: x*100*d for x in range(problem)}

    score[problem] = problem * 100 * d +complete



    for i in range(1, total_problem + 1):

        for j in range(0, i + 1):

            if i - j > problem:

                dp[d][i] = max(dp[d][i], dp[d - 1][j])

            else:

                dp[d][i] = max(dp[d][i], dp[d-1][j] + score[i-j])



for i, a in enumerate(dp[difficulties]):

    if a >= goal:

        print(i)

        exit()

difficulties, goal = list(map(int, input().split()))



pcs = [list(map(int, input().split())) for _ in range(difficulties)]



total_problem = 0

new_dp = [0] * 1001



for d, pc in enumerate(pcs, 1):

    dp = new_dp[:]



    problem, complete = pc

    total_problem += problem



    score = {x: x*100*d for x in range(problem)}

    score[problem] = problem * 100 * d +complete



    for i in range(1, total_problem + 1):

        for j in range(0, i + 1):

            if i - j > problem:

                continue

            else:

                new_dp[i] = max(new_dp[i], dp[j] + score[i-j])



for i, a in enumerate(new_dp):

    if a >= goal:

        print(i)

        exit()

difficulties, goal = list(map(int, input().split()))
pcs = [list(map(int, input().split())) for _ in range(difficulties)]
dp = [[0] * 1102 for _ in range(difficulties + 1)]
total_problem = 0
for d, pc in enumerate(pcs, 1):
    problem, complete = pc
    total_problem += problem
    score = {x: x * 100 * d for x in range(problem)}
    score[problem] = problem * 100 * d + complete
    for i in range(1, total_problem + 1):
        for j in range(0, i + 1):
            if i - j > problem:
                dp[d][i] = max(dp[d][i], dp[d - 1][j])
            else:
                dp[d][i] = max(dp[d][i], dp[d - 1][j] + score[i - j])
for i, a in enumerate(dp[difficulties]):
    if a >= goal:
        print(i)
        exit()

difficulties, goal = list(map(int, input().split()))
pcs = [list(map(int, input().split())) for _ in range(difficulties)]
total_problem = 0
new_dp = [0] * 1001
for d, pc in enumerate(pcs, 1):
    dp = new_dp[:]
    problem, complete = pc
    total_problem += problem
    score = {x: x * 100 * d for x in range(problem)}
    score[problem] = problem * 100 * d + complete
    for i in range(1, total_problem + 1):
        for j in range(0, i + 1):
            if i - j > problem:
                continue
            else:
                new_dp[i] = max(new_dp[i], dp[j] + score[i - j])
for i, a in enumerate(new_dp):
    if a >= goal:
        print(i)
        exit()

-dp = [[0] * 1102 for _ in range(difficulties + 1)] +new_dp = [0] * 1001 +    dp = new_dp[:] -                dp[d][i] = max(dp[d][i], dp[d - 1][j]) +                continue -                dp[d][i] = max(dp[d][i], dp[d - 1][j] + score[i - j]) -for i, a in enumerate(dp[difficulties]): +                new_dp[i] = max(new_dp[i], dp[j] + score[i - j]) +for i, a in enumerate(new_dp):