fun main(args: Array<String>) {
    val (n, h) = readLine()!!.split(" ").map(String::toInt)
    val aArray = Array(n, {0})
    val bArray = Array(n, {0})
    for (i in 0 until n) {
        val(a, b) = readLine()!!.split(" ").map(String::toInt)
        aArray[i] = a
        bArray[i] = b
    }
    val aMax = aArray.max()!!
    val filteredBArray = bArray.filter { it > aMax }.sortedDescending()

    var ans = 0
    var acc = 0
    for (b in filteredBArray) {
        acc += b
        ans += 1
        if (acc >= h) {
            println(ans)
            return
        }
    }
    println(ans + (h - acc + aMax - 1) / aMax)
}