import heapq



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

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



ret = float('inf')

for mask in range(1 << n):

    total = 0

    count = 0

    pq = []

    for bit in range(n):

        num, bonus = a[bit]

        points = (bit + 1) * 100

        if (mask >> bit) & 1:

            total += points * num + bonus

            count += num

        else:

            for i in range(num):

                heapq.heappush(pq, -points)

    while total < need and pq:

        total -= heapq.heappop(pq)

        count += 1

    if total >= need:

        ret = min(ret, count)



print(ret)
n, need = list(map(int, input().split()))

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



ret = float('inf')

for mask in range(1 << n):

    total = 0

    count = 0

    for bit in range(n):

        if (mask >> bit) & 1:

            num, bonus = a[bit]

            points = (bit + 1) * 100

            total += points * num + bonus

            count += num

    for bit in range(n - 1, -1, -1):

        if (mask >> bit) & 1 == 0:

            num = a[bit][0]

            points = (bit + 1) * 100

            for i in range(num):

                if total >= need:

                    break

                total += points

                count += 1

    if total >= need:

        ret = min(ret, count)



print(ret)
import heapq

n, need = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
ret = float("inf")
for mask in range(1 << n):
    total = 0
    count = 0
    pq = []
    for bit in range(n):
        num, bonus = a[bit]
        points = (bit + 1) * 100
        if (mask >> bit) & 1:
            total += points * num + bonus
            count += num
        else:
            for i in range(num):
                heapq.heappush(pq, -points)
    while total < need and pq:
        total -= heapq.heappop(pq)
        count += 1
    if total >= need:
        ret = min(ret, count)
print(ret)

n, need = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
ret = float("inf")
for mask in range(1 << n):
    total = 0
    count = 0
    for bit in range(n):
        if (mask >> bit) & 1:
            num, bonus = a[bit]
            points = (bit + 1) * 100
            total += points * num + bonus
            count += num
    for bit in range(n - 1, -1, -1):
        if (mask >> bit) & 1 == 0:
            num = a[bit][0]
            points = (bit + 1) * 100
            for i in range(num):
                if total >= need:
                    break
                total += points
                count += 1
    if total >= need:
        ret = min(ret, count)
print(ret)

-import heapq - -    pq = [] -        num, bonus = a[bit] -        points = (bit + 1) * 100 +            num, bonus = a[bit] +            points = (bit + 1) * 100 -        else: +    for bit in range(n - 1, -1, -1): +        if (mask >> bit) & 1 == 0: +            num = a[bit][0] +            points = (bit + 1) * 100 -                heapq.heappush(pq, -points) -    while total < need and pq: -        total -= heapq.heappop(pq) -        count += 1 +                if total >= need: +                    break +                total += points +                count += 1