program katana
  implicit none
  integer*8 i
  integer*8 n,h,huru_max,nageru_max
  integer*8,allocatable :: huru(:),nageru(:)

  read(*,*) n,h
  allocate(huru(n),nageru(n))
  
  do i=1,n
     read(*,*) huru(i),nageru(i)
  end do

  i=0
  huru_max=maxval(huru)
  nageru_max=maxval(nageru)
  do while(h>0 .and. nageru_max>huru_max)
     i=i+1
     h=h-maxval(nageru)
     nageru(maxloc(nageru))=0
     nageru_max=maxval(nageru)
  end do

  if(h<=0)then
     write(*,*) i
  else
     if(mod(h,huru_max)==0) then
        write(*,*) i+h/huru_max
     else
        write(*,*) i+h/huru_max+1
     end if
  end if

end program katana
