d,g=list(map(int,input().split()))

spc=[]

c=[]

for i in range(d):

    pi,ci=list(map(int,input().split()))

    si=pi*100*(i+1)+ci

    av=si//pi

    spc.append([av,si,pi,ci,100*(i+1)])



#print(spc)



spc.sort(reverse=True)

#print(spc)



#r=g

#icnt=0

#for i in range(d):

#   r=r-spc[i][1]

#   icnt=icnt+spc[i][2]

#   if r<=0:

#       break

#print(r,icnt)





dmin=10000

for i in range(d):

    for j in range(2**d):

#        print("d=",d,"i=",i,"j=",j,j//2,j%2)

        icnt=0

        sisum=0

        j2=j

        for i2 in range(d):

            if i2!=i:

                if j2%2==1:

                    sisum=sisum+spc[i2][1]

                    icnt=icnt+spc[i2][2]

#            if sisum>g:

#               break

#                print("j=",j,icnt,sisum)

            j2=j2//2

        

        for k in range(spc[i][2]):

            sisum=sisum+spc[i][4]

            icnt=icnt+1

#            print("k",k,icnt,sisum)

            if sisum>=g:

                break

        if k==spc[i][2]-1 :

            sisum=sisum+spc[i][3]

#        if sisum>=g :

#            print("kend",icnt,sisum)

        if sisum>=g and icnt<dmin :

            dmin=icnt

#            print("dmin=",dmin,sisum)

    

print(dmin)     

         


import itertools



d,g=list(map(int,input().split()))

pc=[[0]*2 for i in range(d)]

for i in range(d):

    pc[i]=list(map(int,input().split()))



icntmin=10*100+1

for j in itertools.product([0,1], repeat=d):

    icnt=0

    gcnt=0

    for i in range(d):

        if j[i]==1:

            icnt+=pc[i][0]

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

        else:

            ii=i

            

#    print("1",icnt,gcnt,j)

    if gcnt>=g:

        icntmin=min(icnt,icntmin)

        continue

    else:

        gr=g-gcnt

        k=(gr-1)//(100*(ii+1))+1

        if k<pc[ii][0]:

            icnt+=k

            gcnt+=k*100*(ii+1)

            icntmin=min(icnt,icntmin)

#    print("2",icnt,gcnt,ii,gr,k,j)

        

print(icntmin)



d, g = list(map(int, input().split()))
spc = []
c = []
for i in range(d):
    pi, ci = list(map(int, input().split()))
    si = pi * 100 * (i + 1) + ci
    av = si // pi
    spc.append([av, si, pi, ci, 100 * (i + 1)])
# print(spc)
spc.sort(reverse=True)
# print(spc)
# r=g
# icnt=0
# for i in range(d):
#   r=r-spc[i][1]
#   icnt=icnt+spc[i][2]
#   if r<=0:
#       break
# print(r,icnt)
dmin = 10000
for i in range(d):
    for j in range(2**d):
        #        print("d=",d,"i=",i,"j=",j,j//2,j%2)
        icnt = 0
        sisum = 0
        j2 = j
        for i2 in range(d):
            if i2 != i:
                if j2 % 2 == 1:
                    sisum = sisum + spc[i2][1]
                    icnt = icnt + spc[i2][2]
            #            if sisum>g:
            #               break
            #                print("j=",j,icnt,sisum)
            j2 = j2 // 2
        for k in range(spc[i][2]):
            sisum = sisum + spc[i][4]
            icnt = icnt + 1
            #            print("k",k,icnt,sisum)
            if sisum >= g:
                break
        if k == spc[i][2] - 1:
            sisum = sisum + spc[i][3]
        #        if sisum>=g :
        #            print("kend",icnt,sisum)
        if sisum >= g and icnt < dmin:
            dmin = icnt
#            print("dmin=",dmin,sisum)
print(dmin)

import itertools

d, g = list(map(int, input().split()))
pc = [[0] * 2 for i in range(d)]
for i in range(d):
    pc[i] = list(map(int, input().split()))
icntmin = 10 * 100 + 1
for j in itertools.product([0, 1], repeat=d):
    icnt = 0
    gcnt = 0
    for i in range(d):
        if j[i] == 1:
            icnt += pc[i][0]
            gcnt += pc[i][0] * 100 * (i + 1) + pc[i][1]
        else:
            ii = i
    #    print("1",icnt,gcnt,j)
    if gcnt >= g:
        icntmin = min(icnt, icntmin)
        continue
    else:
        gr = g - gcnt
        k = (gr - 1) // (100 * (ii + 1)) + 1
        if k < pc[ii][0]:
            icnt += k
            gcnt += k * 100 * (ii + 1)
            icntmin = min(icnt, icntmin)
#    print("2",icnt,gcnt,ii,gr,k,j)
print(icntmin)

+import itertools + -spc = [] -c = [] +pc = [[0] * 2 for i in range(d)] -    pi, ci = list(map(int, input().split())) -    si = pi * 100 * (i + 1) + ci -    av = si // pi -    spc.append([av, si, pi, ci, 100 * (i + 1)]) -# print(spc) -spc.sort(reverse=True) -# print(spc) -# r=g -# icnt=0 -# for i in range(d): -#   r=r-spc[i][1] -#   icnt=icnt+spc[i][2] -#   if r<=0: -#       break -# print(r,icnt) -dmin = 10000 -for i in range(d): -    for j in range(2**d): -        #        print("d=",d,"i=",i,"j=",j,j//2,j%2) -        icnt = 0 -        sisum = 0 -        j2 = j -        for i2 in range(d): -            if i2 != i: -                if j2 % 2 == 1: -                    sisum = sisum + spc[i2][1] -                    icnt = icnt + spc[i2][2] -            #            if sisum>g: -            #               break -            #                print("j=",j,icnt,sisum) -            j2 = j2 // 2 -        for k in range(spc[i][2]): -            sisum = sisum + spc[i][4] -            icnt = icnt + 1 -            #            print("k",k,icnt,sisum) -            if sisum >= g: -                break -        if k == spc[i][2] - 1: -            sisum = sisum + spc[i][3] -        #        if sisum>=g : -        #            print("kend",icnt,sisum) -        if sisum >= g and icnt < dmin: -            dmin = icnt -#            print("dmin=",dmin,sisum) -print(dmin) +    pc[i] = list(map(int, input().split())) +icntmin = 10 * 100 + 1 +for j in itertools.product([0, 1], repeat=d): +    icnt = 0 +    gcnt = 0 +    for i in range(d): +        if j[i] == 1: +            icnt += pc[i][0] +            gcnt += pc[i][0] * 100 * (i + 1) + pc[i][1] +        else: +            ii = i +    #    print("1",icnt,gcnt,j) +    if gcnt >= g: +        icntmin = min(icnt, icntmin) +        continue +    else: +        gr = g - gcnt +        k = (gr - 1) // (100 * (ii + 1)) + 1 +        if k < pc[ii][0]: +            icnt += k +            gcnt += k * 100 * (ii + 1) +            icntmin = min(icnt, icntmin) +#    print("2",icnt,gcnt,ii,gr,k,j) +print(icntmin)