module lib1

let allLines = seq{
    let mutable line = System.Console.ReadLine()
    while line <> null do
        yield line
        line <- System.Console.ReadLine()
}

let mutable line = System.Console.ReadLine()

let data = 
    line.Split(' ')

let H = int64 data.[1]

let katanas =
    allLines
    |> Seq.map (fun l ->
        let ll = l.Split(' ')
        int64 ll.[0], int64 ll.[1]
    )
    |>Seq.toList

let maxA = List.maxBy (fun x -> fst x) katanas
let B = List.sortBy (fun x -> snd x) katanas |> List.rev
let hp, count =
    B
    |> List.fold (fun s (_, b) ->
        if b < fst maxA || fst s <= int64 0 then s
        else
            let newHP = fst s - b
            newHP, snd s + 1
    ) (H, 0)

let addCount = float hp / float (fst maxA) |> ceil |> int64
if hp > int64 0 then System.Console.WriteLine(int64 count + addCount)
else System.Console.WriteLine(count)
