fun main() {
    val (n, h) = longList()
    var d = 0L
    var c = 0
    val katana = mutableListOf<Katana>()
    repeat(n.toInt()) {
        val (a, b) = longList()
        katana.add(Katana(it, a, b))
    }
    katana.sortBy { it.b }
    val attack = katana.maxBy { it.a }!!
    val l = katana.lowerBound(attack)
    l.until(n.toInt()).forEach {
        d += katana[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)

fun List<Katana>.lowerBound(e: Katana): Int {
    val index = binarySearch(e, Comparator { x, y -> if (x.b >= y.b) 1 else -1 })
    return if (index >= 0) {
        index
    } else {
        -(index + 1)
    }
}

fun List<Katana>.upperBound(e: Katana): Int {
    val index = binarySearch(e, Comparator { x, y -> if (x.b > y.b) 1 else -1 })
    return if (index >= 0) {
        index
    } else {
        -(index + 1)
    }
}
