def slove():

    import sys

    import heapq

    input = sys.stdin.readline

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

    m_k = 0

    t = []

    heapq.heapify(t)

    for i in range(n):

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

        m_k = max(m_k, a)

        heapq.heappush(t, -b)

    cnt = 0

    while True:

        if len(t) != 0:

            p = heapq.heappop(t)

            if m_k < -p:

                h += p

                cnt += 1

                if h <= 0:

                    print(cnt)

                    exit()

            else:

                break

        else:

            break

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





if __name__ == '__main__':

    slove()

def slove():

    import sys

    input = sys.stdin.readline

    al = []

    bl = []

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

    for i in range(n):

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

        al.append(a)

        bl.append(b)

    al.sort()

    bl.sort()

    cnt = 0

    while True:

        if h > 0:

            if len(bl) != 0:

                bv = bl.pop()

                if bv > al[-1]:

                    h -= min(h, bv)

                    cnt += 1

                else:

                    break

            else:

                break

        else:

            break

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

    print(cnt)





if __name__ == '__main__':

    slove()

def slove():
    import sys
    import heapq

    input = sys.stdin.readline
    n, h = list(map(int, input().rstrip("\n").split()))
    m_k = 0
    t = []
    heapq.heapify(t)
    for i in range(n):
        a, b = list(map(int, input().rstrip("\n").split()))
        m_k = max(m_k, a)
        heapq.heappush(t, -b)
    cnt = 0
    while True:
        if len(t) != 0:
            p = heapq.heappop(t)
            if m_k < -p:
                h += p
                cnt += 1
                if h <= 0:
                    print(cnt)
                    exit()
            else:
                break
        else:
            break
    print(((h + m_k - 1) // m_k + cnt))


if __name__ == "__main__":
    slove()

def slove():
    import sys

    input = sys.stdin.readline
    al = []
    bl = []
    n, h = list(map(int, input().rstrip("\n").split()))
    for i in range(n):
        a, b = list(map(int, input().rstrip("\n").split()))
        al.append(a)
        bl.append(b)
    al.sort()
    bl.sort()
    cnt = 0
    while True:
        if h > 0:
            if len(bl) != 0:
                bv = bl.pop()
                if bv > al[-1]:
                    h -= min(h, bv)
                    cnt += 1
                else:
                    break
            else:
                break
        else:
            break
    cnt += (h + al[-1] - 1) // al[-1]
    print(cnt)


if __name__ == "__main__":
    slove()

-    import heapq +    al = [] +    bl = [] -    m_k = 0 -    t = [] -    heapq.heapify(t) -        m_k = max(m_k, a) -        heapq.heappush(t, -b) +        al.append(a) +        bl.append(b) +    al.sort() +    bl.sort() -        if len(t) != 0: -            p = heapq.heappop(t) -            if m_k < -p: -                h += p -                cnt += 1 -                if h <= 0: -                    print(cnt) -                    exit() +        if h > 0: +            if len(bl) != 0: +                bv = bl.pop() +                if bv > al[-1]: +                    h -= min(h, bv) +                    cnt += 1 +                else: +                    break -    print(((h + m_k - 1) // m_k + cnt)) +    cnt += (h + al[-1] - 1) // al[-1] +    print(cnt)