Module Module1

    Sub main()
        Dim result As String = ""
        Dim total As Long = 0

        Dim user1 As List(Of String) = New List(Of String)(Split(Console.ReadLine(), " "))
        Dim honsu = user1(0)
        Dim mamoHP = user1(1)

        Dim katanaNormal As New List(Of Long), katanaThrow As New List(Of Long)

        For i = 0 To honsu - 1

            Dim user2 As List(Of String) = New List(Of String)(Split(Console.ReadLine(), " "))
            katanaNormal.Add(user2(0))
            katanaThrow.Add(user2(1))
        Next

        ' 投げ強い順にソート
        katanaThrow.Sort()
        katanaThrow.Reverse()

        ' 殴り強い刀を選出
        katanaNormal.Sort()
        katanaNormal.Reverse()
        Dim maxPowerAttack = katanaNormal(0)

        ' 投げ合計の取得
        Dim throws As New List(Of Long)
        throws = New List(Of Long)(Array.FindAll(katanaThrow.ToArray, Function(num As Long) num >= maxPowerAttack))
        total = throws.Sum

        ' 魔物減算
        mamoHP = mamoHP - total
        Dim attackCount = Math.Ceiling(mamoHP / maxPowerAttack)

        result = throws.Count + attackCount

        Console.WriteLine(result)
    End Sub
end module