import sys





def solve():

    input = sys.stdin.readline

    mod = 10 ** 9 + 7

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

    al = 0

    bl = []

    for i in range(n):

        a, b = list(map(int, input().rstrip('\n').split()))

        al = max(al, a)

        bl.append(b)

    bl.sort()

    cnt = 0

    while True:

        if len(bl) != 0:

            b = bl.pop()

            if h <= 0:

                print(cnt)

                exit()

            elif al < b:

                h -= min(h, b)

                cnt += 1

            else:

                cnt += (h + al - 1) // al

                h -= (h + al - 1) // al * al

                print(cnt)

                exit()

        else:

            cnt += (h + al - 1) // al

            h -= (h + al - 1) // al * al

            print(cnt)

            exit()





if __name__ == '__main__':

    solve()

import sys





def solve():

    input = sys.stdin.readline

    mod = 10 ** 9 + 7

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

    md = 0

    dl = []

    for i in range(n):

        a, b = list(map(int, input().rstrip('\n').split()))

        md = max(md, a)

        dl.append(b)

    dl.sort(reverse=True)

    cnt = 0

    for v in dl:

        if v > md:

            h -= min(h, v)

            cnt += 1

            if h == 0:

                print(cnt)

                exit()

        else:

            break

    cnt += (h + md - 1) // md

    print(cnt)

    exit()





if __name__ == '__main__':

    solve()

import sys


def solve():
    input = sys.stdin.readline
    mod = 10**9 + 7
    n, h = list(map(int, input().rstrip("\n").split()))
    al = 0
    bl = []
    for i in range(n):
        a, b = list(map(int, input().rstrip("\n").split()))
        al = max(al, a)
        bl.append(b)
    bl.sort()
    cnt = 0
    while True:
        if len(bl) != 0:
            b = bl.pop()
            if h <= 0:
                print(cnt)
                exit()
            elif al < b:
                h -= min(h, b)
                cnt += 1
            else:
                cnt += (h + al - 1) // al
                h -= (h + al - 1) // al * al
                print(cnt)
                exit()
        else:
            cnt += (h + al - 1) // al
            h -= (h + al - 1) // al * al
            print(cnt)
            exit()


if __name__ == "__main__":
    solve()

import sys


def solve():
    input = sys.stdin.readline
    mod = 10**9 + 7
    n, h = list(map(int, input().rstrip("\n").split()))
    md = 0
    dl = []
    for i in range(n):
        a, b = list(map(int, input().rstrip("\n").split()))
        md = max(md, a)
        dl.append(b)
    dl.sort(reverse=True)
    cnt = 0
    for v in dl:
        if v > md:
            h -= min(h, v)
            cnt += 1
            if h == 0:
                print(cnt)
                exit()
        else:
            break
    cnt += (h + md - 1) // md
    print(cnt)
    exit()


if __name__ == "__main__":
    solve()

-    al = 0 -    bl = [] +    md = 0 +    dl = [] -        al = max(al, a) -        bl.append(b) -    bl.sort() +        md = max(md, a) +        dl.append(b) +    dl.sort(reverse=True) -    while True: -        if len(bl) != 0: -            b = bl.pop() -            if h <= 0: -                print(cnt) -                exit() -            elif al < b: -                h -= min(h, b) -                cnt += 1 -            else: -                cnt += (h + al - 1) // al -                h -= (h + al - 1) // al * al +    for v in dl: +        if v > md: +            h -= min(h, v) +            cnt += 1 +            if h == 0: -            cnt += (h + al - 1) // al -            h -= (h + al - 1) // al * al -            print(cnt) -            exit() +            break +    cnt += (h + md - 1) // md +    print(cnt) +    exit()