import functools

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

G = G // 100

sumn = 0

ns = [0] * (D + 1)

cs = [0] * (D + 1)

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

    n, c = list(map(int, input().split()))

    ns[i] = n

    cs[i] = c // 100

    sumn += n



minn = [0] * (D + 1)

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

    minn[i] = min(ns[1:i+1])



@functools.lru_cache(maxsize=None)

def f(i, rn):

    if i == 1:

        if ns[1] < rn:

            return -1

        p = rn

        if ns[1] == rn:

            p += cs[1]

        return p

    if rn < minn[i]:

        p = 0

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

            n = min((ns[j], rn))

            p += j * n

            if n == rn:

                break

            rn -= n

        return p

    maxp = 0

    for n in range(min((ns[i], rn)) + 1):

        p = i * n

        if n == ns[i]:

            p += cs[i]

        np = f(i - 1, rn - n)

        if np >= 0:

            p += np

            if maxp < p:

                maxp = p

    return maxp



mn = 1

mx = sumn

while mn < mx:

    x = mn + ((mx - mn) // 2)

    if G <= f(D, x):

        mx = x

    else:

        mn = x + 1

print(mn)

from itertools import combinations

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

G = G // 100

ns = [0] * (D + 1)

cs = [0] * (D + 1)

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

    n, c = list(map(int, input().split()))

    ns[i] = n

    cs[i] = c // 100



ans = sum(ns)

for partialsn in range(1, D + 1):

    for partials in combinations(list(range(1, D + 1)), partialsn):

        sumn = 0

        rp = G

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

            if not i in partials:

                sumn += ns[i]

                rp -= i * ns[i] + cs[i]

        if rp > 0:

            for i in sorted(partials, reverse=True):

                n = ns[i] - 1

                if rp <= i * n:

                    n = rp // i

                    if rp % i != 0:

                        n += 1

                sumn += n

                rp -= i * n

                if rp <= 0:

                    break

        if rp <= 0:

            if sumn < ans:

                ans = sumn

print(ans)

import functools

D, G = list(map(int, input().split()))
G = G // 100
sumn = 0
ns = [0] * (D + 1)
cs = [0] * (D + 1)
for i in range(1, D + 1):
    n, c = list(map(int, input().split()))
    ns[i] = n
    cs[i] = c // 100
    sumn += n
minn = [0] * (D + 1)
for i in range(1, D + 1):
    minn[i] = min(ns[1 : i + 1])


@functools.lru_cache(maxsize=None)
def f(i, rn):
    if i == 1:
        if ns[1] < rn:
            return -1
        p = rn
        if ns[1] == rn:
            p += cs[1]
        return p
    if rn < minn[i]:
        p = 0
        for j in range(i, 0, -1):
            n = min((ns[j], rn))
            p += j * n
            if n == rn:
                break
            rn -= n
        return p
    maxp = 0
    for n in range(min((ns[i], rn)) + 1):
        p = i * n
        if n == ns[i]:
            p += cs[i]
        np = f(i - 1, rn - n)
        if np >= 0:
            p += np
            if maxp < p:
                maxp = p
    return maxp


mn = 1
mx = sumn
while mn < mx:
    x = mn + ((mx - mn) // 2)
    if G <= f(D, x):
        mx = x
    else:
        mn = x + 1
print(mn)

from itertools import combinations

D, G = list(map(int, input().split()))
G = G // 100
ns = [0] * (D + 1)
cs = [0] * (D + 1)
for i in range(1, D + 1):
    n, c = list(map(int, input().split()))
    ns[i] = n
    cs[i] = c // 100
ans = sum(ns)
for partialsn in range(1, D + 1):
    for partials in combinations(list(range(1, D + 1)), partialsn):
        sumn = 0
        rp = G
        for i in range(1, D + 1):
            if not i in partials:
                sumn += ns[i]
                rp -= i * ns[i] + cs[i]
        if rp > 0:
            for i in sorted(partials, reverse=True):
                n = ns[i] - 1
                if rp <= i * n:
                    n = rp // i
                    if rp % i != 0:
                        n += 1
                sumn += n
                rp -= i * n
                if rp <= 0:
                    break
        if rp <= 0:
            if sumn < ans:
                ans = sumn
print(ans)

-import functools +from itertools import combinations -sumn = 0 -    sumn += n -minn = [0] * (D + 1) -for i in range(1, D + 1): -    minn[i] = min(ns[1 : i + 1]) - - -@functools.lru_cache(maxsize=None) -def f(i, rn): -    if i == 1: -        if ns[1] < rn: -            return -1 -        p = rn -        if ns[1] == rn: -            p += cs[1] -        return p -    if rn < minn[i]: -        p = 0 -        for j in range(i, 0, -1): -            n = min((ns[j], rn)) -            p += j * n -            if n == rn: -                break -            rn -= n -        return p -    maxp = 0 -    for n in range(min((ns[i], rn)) + 1): -        p = i * n -        if n == ns[i]: -            p += cs[i] -        np = f(i - 1, rn - n) -        if np >= 0: -            p += np -            if maxp < p: -                maxp = p -    return maxp - - -mn = 1 -mx = sumn -while mn < mx: -    x = mn + ((mx - mn) // 2) -    if G <= f(D, x): -        mx = x -    else: -        mn = x + 1 -print(mn) +ans = sum(ns) +for partialsn in range(1, D + 1): +    for partials in combinations(list(range(1, D + 1)), partialsn): +        sumn = 0 +        rp = G +        for i in range(1, D + 1): +            if not i in partials: +                sumn += ns[i] +                rp -= i * ns[i] + cs[i] +        if rp > 0: +            for i in sorted(partials, reverse=True): +                n = ns[i] - 1 +                if rp <= i * n: +                    n = rp // i +                    if rp % i != 0: +                        n += 1 +                sumn += n +                rp -= i * n +                if rp <= 0: +                    break +        if rp <= 0: +            if sumn < ans: +                ans = sumn +print(ans)