# ABC085D - Katana Thrower

import sys

input = sys.stdin.readline



def main():

    N, H = tuple(map(int, input().split()))

    AB = tuple(tuple(map(int, input().split())) for _ in range(N))

    A, B = list(zip(*AB))

    C = sorted([(i, 0) for i in A] + [(i, 1) for i in B], reverse=1)

    ans = 0

    for i, t in C:

        if t == 0:

            ans += (H + i - 1) // i

            break

        else:

            ans += 1

            H -= i

            if H <= 0:

                break

    print(ans)





if __name__ == "__main__":

    main()
# ABC085D - Katana Thrower

import sys

input = sys.stdin.readline



def main():

    N, H = tuple(map(int, input().split()))

    AB = tuple(tuple(map(int, input().split())) for _ in range(N))

    A, B = list(zip(*AB))

    x = max(A)

    B = sorted([i for i in B if i > x], reverse=1)

    ans = 0

    for i in B:

        ans += 1

        H -= i

        if H <= 0:

            break

    else:

        ans += (H + x - 1) // x

    print(ans)





if __name__ == "__main__":

    main()
# ABC085D - Katana Thrower
import sys

input = sys.stdin.readline


def main():
    N, H = tuple(map(int, input().split()))
    AB = tuple(tuple(map(int, input().split())) for _ in range(N))
    A, B = list(zip(*AB))
    C = sorted([(i, 0) for i in A] + [(i, 1) for i in B], reverse=1)
    ans = 0
    for i, t in C:
        if t == 0:
            ans += (H + i - 1) // i
            break
        else:
            ans += 1
            H -= i
            if H <= 0:
                break
    print(ans)


if __name__ == "__main__":
    main()

# ABC085D - Katana Thrower
import sys

input = sys.stdin.readline


def main():
    N, H = tuple(map(int, input().split()))
    AB = tuple(tuple(map(int, input().split())) for _ in range(N))
    A, B = list(zip(*AB))
    x = max(A)
    B = sorted([i for i in B if i > x], reverse=1)
    ans = 0
    for i in B:
        ans += 1
        H -= i
        if H <= 0:
            break
    else:
        ans += (H + x - 1) // x
    print(ans)


if __name__ == "__main__":
    main()

-    C = sorted([(i, 0) for i in A] + [(i, 1) for i in B], reverse=1) +    x = max(A) +    B = sorted([i for i in B if i > x], reverse=1) -    for i, t in C: -        if t == 0: -            ans += (H + i - 1) // i +    for i in B: +        ans += 1 +        H -= i +        if H <= 0: -        else: -            ans += 1 -            H -= i -            if H <= 0: -                break +    else: +        ans += (H + x - 1) // x