import sys





def solve():

    input = sys.stdin.readline

    mod = 10 ** 9 + 7

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

    ab = [list(map(int, input().rstrip('\n').split())) for _ in range(n)]

    ab.sort(reverse=True)

    ma = ab[0][0]

    ab.sort(key=lambda x: x[1], reverse=True)

    cnt = 0

    for a, b in ab:

        if ma >= b or h <= 0:

            break

        else:

            h = max(h - b, 0)

            cnt += 1

    print((cnt + (h + ma - 1) // ma))





if __name__ == '__main__':

    solve()

import sys

import collections





def solve():

    input = sys.stdin.readline

    mod = 10 ** 9 + 7

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

    al = []

    bl = []

    for i in range(n):

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

        al.append(a)

        bl.append(b)

    al.sort()

    bl.sort()

    al = collections.deque(al)

    bl = collections.deque(bl)

    k = al[-1]

    cnt = 0

    while True:

        if len(bl) != 0:

            p = bl.pop()

            if p > k and h != 0:

                h -= min(p, h)

                cnt += 1

            else:

                print((cnt + (h + k - 1) // k))

                exit()

        else:

            print((cnt + (h + k - 1) // k))

            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()))
    ab = [list(map(int, input().rstrip("\n").split())) for _ in range(n)]
    ab.sort(reverse=True)
    ma = ab[0][0]
    ab.sort(key=lambda x: x[1], reverse=True)
    cnt = 0
    for a, b in ab:
        if ma >= b or h <= 0:
            break
        else:
            h = max(h - b, 0)
            cnt += 1
    print((cnt + (h + ma - 1) // ma))


if __name__ == "__main__":
    solve()

import sys
import collections


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


if __name__ == "__main__":
    solve()

+import collections -    ab = [list(map(int, input().rstrip("\n").split())) for _ in range(n)] -    ab.sort(reverse=True) -    ma = ab[0][0] -    ab.sort(key=lambda x: x[1], reverse=True) +    al = [] +    bl = [] +    for i in range(n): +        a, b = list(map(int, input().rstrip("\n").split())) +        al.append(a) +        bl.append(b) +    al.sort() +    bl.sort() +    al = collections.deque(al) +    bl = collections.deque(bl) +    k = al[-1] -    for a, b in ab: -        if ma >= b or h <= 0: -            break +    while True: +        if len(bl) != 0: +            p = bl.pop() +            if p > k and h != 0: +                h -= min(p, h) +                cnt += 1 +            else: +                print((cnt + (h + k - 1) // k)) +                exit() -            h = max(h - b, 0) -            cnt += 1 -    print((cnt + (h + ma - 1) // ma)) +            print((cnt + (h + k - 1) // k)) +            exit()