fun main(args: Array<String>) {
    val (n,h) = readLine()!!.split(" ").map { it.toInt() }
    val ab = (1..n).map { readLine()!!.split(" ").map { it.toInt() } }

    val a = ab.map { it[0] }.max()!!
    val b = ab.map { it[1] }.filter { it>a }.sortedDescending()

    var damage = 0
    var count = 0
    while(damage<h) {
        if(b.isNotEmpty()) damage += b[count++]
        if(count==b.size) {
            count += (h-damage+a-1)/a
            break
        }
    }
    println(count)

}
