program ABC085D
    implicit none
    integer(16)::N,H,i
    integer(16)::result=0
    integer(16),allocatable,dimension(:)::A,B,A_sort,B_sort
    read(5,*)N,H
    allocate(A(N))
    allocate(A_sort(N))
    allocate(B(N))
    allocate(B_sort(N))

    do i=1,N
        read(5,*)A_sort(i),B_sort(i)
    end do

    A=A_sort
    B=B_sort
    A_sort=iqsort(A_sort)
    B_sort=iqsort(B_sort)

    do i=1,N
        if(B(i)>=A_sort(N))then
            H=H-B(i)
            result=result+1
        end if

        if(H<=0)then
            exit
        end if
    end do

    if(H>0)then
        result=result+H/A_sort(N)

        if(mod(H,A_sort(N))/=0)then
            result=result+1
        end if
    end if

    print'(i0)',result
    
contains
    recursive function iqsort(ix) result(ires)
      integer(16), allocatable :: ires(:)
      integer(16), intent(in)  :: ix(:)
      integer :: k
      if (size(ix) <= 1) then 
        ires = ix
      else  
        k = ix(size(ix) / 2)
        ires = [iqsort(pack(ix, ix < k)), pack(ix, ix == k), iqsort(pack(ix, ix > k))] 
      end if
    end function iqsort
end program ABC085D