D, G = list(map(int, input().split()))

PC = [list(map(int, input().split())) for i in range(D)]





def solve(G, i):

    if i <= 0:

        return float('inf')

    n = min(int(G/(100*i)), PC[i-1][0])

    score = 100 * i * n

    if n == PC[i-1][0]:

        score += PC[i-1][1]

    if G > score:

        n += solve(G-score, i-1)

    return min(n, solve(G, i-1))





print((solve(G, D)))
D, G = list(map(int, input().split()))

PC = [list(map(int, input().split())) for i in range(D)]

PC_new = sorted([(PC[i][0]*100*(i+1) + PC[i][1], PC[i][0]) for i in range(D)],

                key=lambda x: x[1], reverse=True)



ans = 99999999

for i in range(1<<D):

    ct = 0

    score = 0

    for j in range(D):

        if i>>j&1:

            score += PC[j][1]

            score += PC[j][0] * (j+1) * 100

            ct += PC[j][0]

    for j in range(D-1, -1, -1):

        if i>>j&1: continue

        if score >= G: break

        g = (j+1)*100

        got = (G-score+g-1)//g

        score += min(got, PC[j][0]) * g

        ct += min(got, PC[j][0])

    ans = min(ans, ct)

print(ans)

D, G = list(map(int, input().split()))
PC = [list(map(int, input().split())) for i in range(D)]


def solve(G, i):
    if i <= 0:
        return float("inf")
    n = min(int(G / (100 * i)), PC[i - 1][0])
    score = 100 * i * n
    if n == PC[i - 1][0]:
        score += PC[i - 1][1]
    if G > score:
        n += solve(G - score, i - 1)
    return min(n, solve(G, i - 1))


print((solve(G, D)))

D, G = list(map(int, input().split()))
PC = [list(map(int, input().split())) for i in range(D)]
PC_new = sorted(
    [(PC[i][0] * 100 * (i + 1) + PC[i][1], PC[i][0]) for i in range(D)],
    key=lambda x: x[1],
    reverse=True,
)
ans = 99999999
for i in range(1 << D):
    ct = 0
    score = 0
    for j in range(D):
        if i >> j & 1:
            score += PC[j][1]
            score += PC[j][0] * (j + 1) * 100
            ct += PC[j][0]
    for j in range(D - 1, -1, -1):
        if i >> j & 1:
            continue
        if score >= G:
            break
        g = (j + 1) * 100
        got = (G - score + g - 1) // g
        score += min(got, PC[j][0]) * g
        ct += min(got, PC[j][0])
    ans = min(ans, ct)
print(ans)

- - -def solve(G, i): -    if i <= 0: -        return float("inf") -    n = min(int(G / (100 * i)), PC[i - 1][0]) -    score = 100 * i * n -    if n == PC[i - 1][0]: -        score += PC[i - 1][1] -    if G > score: -        n += solve(G - score, i - 1) -    return min(n, solve(G, i - 1)) - - -print((solve(G, D))) +PC_new = sorted( +    [(PC[i][0] * 100 * (i + 1) + PC[i][1], PC[i][0]) for i in range(D)], +    key=lambda x: x[1], +    reverse=True, +) +ans = 99999999 +for i in range(1 << D): +    ct = 0 +    score = 0 +    for j in range(D): +        if i >> j & 1: +            score += PC[j][1] +            score += PC[j][0] * (j + 1) * 100 +            ct += PC[j][0] +    for j in range(D - 1, -1, -1): +        if i >> j & 1: +            continue +        if score >= G: +            break +        g = (j + 1) * 100 +        got = (G - score + g - 1) // g +        score += min(got, PC[j][0]) * g +        ct += min(got, PC[j][0]) +    ans = min(ans, ct) +print(ans)