import sys

sys.setrecursionlimit(100000)

inf = float('inf')



def dfs(h, s):

    # 停止条件

    if h == D:

        tmp = 0

        p = 0

        ans = 0

        for i, c in enumerate(s):

            if c == '0':

                tmp = i

            else:

                ans += pc[i][0]

                p += (i+1) * 100 * pc[i][0] + pc[i][1]

        for i in range(pc[tmp][0]-1):

            if p < G:

                p += (tmp + 1) * 100

                ans += 1

        if p < G:

            return inf

        else:

            return ans

    tmp1 = dfs(h+1, s + '0')

    tmp2 = dfs(h+1, s + '1')

    return min(tmp1, tmp2)





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

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

print((dfs(0, '')))
D, G=list(map(int, input().split()))

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



def function(G, i):

	if i==0:

		return 1e9

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

	s=n*i*100

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

		s+=PC[i][1]

	if s<G:

		n+=function(G-s, i-1)

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

print((function(G, D)))

import sys

sys.setrecursionlimit(100000)
inf = float("inf")


def dfs(h, s):
    # 停止条件
    if h == D:
        tmp = 0
        p = 0
        ans = 0
        for i, c in enumerate(s):
            if c == "0":
                tmp = i
            else:
                ans += pc[i][0]
                p += (i + 1) * 100 * pc[i][0] + pc[i][1]
        for i in range(pc[tmp][0] - 1):
            if p < G:
                p += (tmp + 1) * 100
                ans += 1
        if p < G:
            return inf
        else:
            return ans
    tmp1 = dfs(h + 1, s + "0")
    tmp2 = dfs(h + 1, s + "1")
    return min(tmp1, tmp2)


D, G = list(map(int, input().split()))
pc = [list(map(int, input().split())) for _ in range(D)]
print((dfs(0, "")))

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


def function(G, i):
    if i == 0:
        return 1e9
    n = min(G // (i * 100), PC[i][0])
    s = n * i * 100
    if n == PC[i][0]:
        s += PC[i][1]
    if s < G:
        n += function(G - s, i - 1)
    return min(n, function(G, i - 1))


print((function(G, D)))

-import sys - -sys.setrecursionlimit(100000) -inf = float("inf") +D, G = list(map(int, input().split())) +PC = [0] + [list(map(int, input().split())) for _ in range(D)] -def dfs(h, s): -    # 停止条件 -    if h == D: -        tmp = 0 -        p = 0 -        ans = 0 -        for i, c in enumerate(s): -            if c == "0": -                tmp = i -            else: -                ans += pc[i][0] -                p += (i + 1) * 100 * pc[i][0] + pc[i][1] -        for i in range(pc[tmp][0] - 1): -            if p < G: -                p += (tmp + 1) * 100 -                ans += 1 -        if p < G: -            return inf -        else: -            return ans -    tmp1 = dfs(h + 1, s + "0") -    tmp2 = dfs(h + 1, s + "1") -    return min(tmp1, tmp2) +def function(G, i): +    if i == 0: +        return 1e9 +    n = min(G // (i * 100), PC[i][0]) +    s = n * i * 100 +    if n == PC[i][0]: +        s += PC[i][1] +    if s < G: +        n += function(G - s, i - 1) +    return min(n, function(G, i - 1)) -D, G = list(map(int, input().split())) -pc = [list(map(int, input().split())) for _ in range(D)] -print((dfs(0, ""))) +print((function(G, D)))