program name
    implicit none
    integer(4):: d,g
    integer(4),allocatable:: p(:),c(:)
    integer(4):: i,scr,slv,ans = 1000000000

    read*, d,g
    allocate(p(d),c(d))

    do i=1,d
        read*,p(i),c(i)
    end do


    do i= 0,2**d-1
        call calc_point(i,scr,slv)
        if (scr < g) cycle
        ans = min(ans,slv)
    end do

    print*, ans

    contains
    subroutine calc_point(num,score,solve)
        integer(4),intent(in):: num
        integer(4),intent(out):: score, solve
        integer(4):: i, max_not_solve, max_limit
        score=0
        solve=0
        max_not_solve = 0
        max_limit = 0

        do i=1,d
            if (and(rshift(num,i-1),1) == 1) then
                score=score + 100*i*p(i) + c(i)
                solve=solve + p(i)
            else
                max_not_solve = max(max_not_solve, 100*i)
                max_limit = p(i)
            end if
        end do

        if (score < g) then
            do i=1,max_limit-1
                score = score + max_not_solve
                solve = solve + 1
                if (score >= g) exit
            end do
        end if
    end subroutine
end program name