from bisect import bisect_left

from itertools import accumulate, takewhile

from math import ceil





def solve(h, aa, bb):

    max_a = max(aa)

    bba = list(accumulate(takewhile(lambda x: x > max_a, sorted(bb, reverse=True))))

    if not bba:

        return ceil(h / max_a)

    remain = h - bba[-1]

    if remain <= 0:

        return bisect_left(bba, h) + 1

    return ceil(remain / max_a) + len(bba)





n, h = list(map(int, input().split()))

aa, bb = list(zip(*(list(map(int, input().split())) for _ in range(n))))



print((solve(h, aa, bb)))

from bisect import bisect_left, bisect

from itertools import accumulate

from math import ceil





def solve(h, aa, bb):

    max_a = max(aa)

    bs = sorted(bb)

    i = bisect(bs, max_a)

    if i == n:

        return ceil(h / max_a)

    bba = list(accumulate(reversed(bs[i:])))

    remain = h - bba[-1]

    if remain <= 0:

        return bisect_left(bba, h) + 1

    return ceil(remain / max_a) + len(bba)





n, h = list(map(int, input().split()))

aa, bb = list(zip(*(list(map(int, input().split())) for _ in range(n))))



print((solve(h, aa, bb)))

from bisect import bisect_left
from itertools import accumulate, takewhile
from math import ceil


def solve(h, aa, bb):
    max_a = max(aa)
    bba = list(accumulate(takewhile(lambda x: x > max_a, sorted(bb, reverse=True))))
    if not bba:
        return ceil(h / max_a)
    remain = h - bba[-1]
    if remain <= 0:
        return bisect_left(bba, h) + 1
    return ceil(remain / max_a) + len(bba)


n, h = list(map(int, input().split()))
aa, bb = list(zip(*(list(map(int, input().split())) for _ in range(n))))
print((solve(h, aa, bb)))

from bisect import bisect_left, bisect
from itertools import accumulate
from math import ceil


def solve(h, aa, bb):
    max_a = max(aa)
    bs = sorted(bb)
    i = bisect(bs, max_a)
    if i == n:
        return ceil(h / max_a)
    bba = list(accumulate(reversed(bs[i:])))
    remain = h - bba[-1]
    if remain <= 0:
        return bisect_left(bba, h) + 1
    return ceil(remain / max_a) + len(bba)


n, h = list(map(int, input().split()))
aa, bb = list(zip(*(list(map(int, input().split())) for _ in range(n))))
print((solve(h, aa, bb)))

-from bisect import bisect_left -from itertools import accumulate, takewhile +from bisect import bisect_left, bisect +from itertools import accumulate -    bba = list(accumulate(takewhile(lambda x: x > max_a, sorted(bb, reverse=True)))) -    if not bba: +    bs = sorted(bb) +    i = bisect(bs, max_a) +    if i == n: +    bba = list(accumulate(reversed(bs[i:])))