fun main() {
    val (n, h) = longList()
    var d = 0L
    var c = 0L
    val katana = mutableListOf<Katana>()
    repeat(n.toInt()) {
        val (a, b) = longList()
        katana.add(Katana(it, a, b))
    }
    katana.sortByDescending { it.b }
    val attack = katana.maxBy { it.a }!!
    katana.forEach {
        if (it.b <= attack.a) {
            c += ((h - d) / attack.a).toInt()
            if ((h - d) % attack.a > 0) {
                c++
            }
            println("$c")
            return
        } else {
            d += it.b
            c++
            if (d >= h) {
                println("$c")
                return
            }
        }
    }
    c += ((h - d) / attack.a).toInt()
    if ((h - d) % attack.a > 0) {
        c++
    }
    println("$c")
}

fun longList() = readLine()?.split(" ")?.map(String::toLong) ?: TODO()
data class Katana(val i: Int, val a: Long, val b: Long)
