from copy import copy

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

p=[]

c=[]

for i in range(D):

    a,b=list(map(int,input().split()))

    p.append(a)

    c.append(b)

lst1=[]

lst2=[]

lst3=[]

def func1(l1,l2,l3,p,c,G):

    S=0

    n=0

    ind=0

    for i in range(len(l1)):

        S+=c[i]*l1[i]

        n+=p[i]*l1[i]

        S+=p[i]*100*(i+1)*l1[i]

    for i in range(len(l2)):

        if S>=G:

            break

        kazu=len(l2)-i

        a=l2[kazu-1]

        for j in range(1,a+1):

            if j==a:

                break

            S+=100*kazu

            n+=1

            if S>=G:

                break

    if S>=G:

        l3.append(n)

        l3.append(S)

    return 0

def func(l1,l2,l3,num,p,c,G):

    if num==0:

        func1(l1,l2,l3,p,c,G)

        return 0

    y1=copy(l2)

    y2=copy(l2)

    y2[len(l1)]=0

    x1=copy(l1)

    x1.append(0)

    x2=copy(l1)

    x2.append(1)

    num-=1

    return func(x1,y1,l3,num,p,c,G),func(x2,y2,l3,num,p,c,G)

func(lst1,p,lst3,D,p,c,G)

print((min(lst3)))
from math import ceil

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

P=[]

C=[]

R=[]

for i in range(D):

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

    P.append(p)

    C.append(c)

    R.append((i+1)*100*p+c)

bit=2**D

ans=10**19

for i in range(bit):

    i=bin(i)[2:].zfill(D)

    su=0

    num=0

    k=-1

    for j in range(D):

        k=int(i[j])

        su+=k*R[j]

        num+=k*P[j]

        if k==0:

            t=j

    if G<=su:

        ans=min(ans,num)

        continue

    if k==-1:

        continue

    if  ceil((G-su)/((t+1)*100))<P[t]:

        ans=min(ans,num+ceil((G-su)/((t+1)*100)))

print(ans)

from copy import copy

D, G = list(map(int, input().split()))
p = []
c = []
for i in range(D):
    a, b = list(map(int, input().split()))
    p.append(a)
    c.append(b)
lst1 = []
lst2 = []
lst3 = []


def func1(l1, l2, l3, p, c, G):
    S = 0
    n = 0
    ind = 0
    for i in range(len(l1)):
        S += c[i] * l1[i]
        n += p[i] * l1[i]
        S += p[i] * 100 * (i + 1) * l1[i]
    for i in range(len(l2)):
        if S >= G:
            break
        kazu = len(l2) - i
        a = l2[kazu - 1]
        for j in range(1, a + 1):
            if j == a:
                break
            S += 100 * kazu
            n += 1
            if S >= G:
                break
    if S >= G:
        l3.append(n)
        l3.append(S)
    return 0


def func(l1, l2, l3, num, p, c, G):
    if num == 0:
        func1(l1, l2, l3, p, c, G)
        return 0
    y1 = copy(l2)
    y2 = copy(l2)
    y2[len(l1)] = 0
    x1 = copy(l1)
    x1.append(0)
    x2 = copy(l1)
    x2.append(1)
    num -= 1
    return func(x1, y1, l3, num, p, c, G), func(x2, y2, l3, num, p, c, G)


func(lst1, p, lst3, D, p, c, G)
print((min(lst3)))

from math import ceil

D, G = list(map(int, input().split()))
P = []
C = []
R = []
for i in range(D):
    p, c = list(map(int, input().split()))
    P.append(p)
    C.append(c)
    R.append((i + 1) * 100 * p + c)
bit = 2**D
ans = 10**19
for i in range(bit):
    i = bin(i)[2:].zfill(D)
    su = 0
    num = 0
    k = -1
    for j in range(D):
        k = int(i[j])
        su += k * R[j]
        num += k * P[j]
        if k == 0:
            t = j
    if G <= su:
        ans = min(ans, num)
        continue
    if k == -1:
        continue
    if ceil((G - su) / ((t + 1) * 100)) < P[t]:
        ans = min(ans, num + ceil((G - su) / ((t + 1) * 100)))
print(ans)

-from copy import copy +from math import ceil -p = [] -c = [] +P = [] +C = [] +R = [] -    a, b = list(map(int, input().split())) -    p.append(a) -    c.append(b) -lst1 = [] -lst2 = [] -lst3 = [] - - -def func1(l1, l2, l3, p, c, G): -    S = 0 -    n = 0 -    ind = 0 -    for i in range(len(l1)): -        S += c[i] * l1[i] -        n += p[i] * l1[i] -        S += p[i] * 100 * (i + 1) * l1[i] -    for i in range(len(l2)): -        if S >= G: -            break -        kazu = len(l2) - i -        a = l2[kazu - 1] -        for j in range(1, a + 1): -            if j == a: -                break -            S += 100 * kazu -            n += 1 -            if S >= G: -                break -    if S >= G: -        l3.append(n) -        l3.append(S) -    return 0 - - -def func(l1, l2, l3, num, p, c, G): -    if num == 0: -        func1(l1, l2, l3, p, c, G) -        return 0 -    y1 = copy(l2) -    y2 = copy(l2) -    y2[len(l1)] = 0 -    x1 = copy(l1) -    x1.append(0) -    x2 = copy(l1) -    x2.append(1) -    num -= 1 -    return func(x1, y1, l3, num, p, c, G), func(x2, y2, l3, num, p, c, G) - - -func(lst1, p, lst3, D, p, c, G) -print((min(lst3))) +    p, c = list(map(int, input().split())) +    P.append(p) +    C.append(c) +    R.append((i + 1) * 100 * p + c) +bit = 2**D +ans = 10**19 +for i in range(bit): +    i = bin(i)[2:].zfill(D) +    su = 0 +    num = 0 +    k = -1 +    for j in range(D): +        k = int(i[j]) +        su += k * R[j] +        num += k * P[j] +        if k == 0: +            t = j +    if G <= su: +        ans = min(ans, num) +        continue +    if k == -1: +        continue +    if ceil((G - su) / ((t + 1) * 100)) < P[t]: +        ans = min(ans, num + ceil((G - su) / ((t + 1) * 100))) +print(ans)