# ABC 085 D

import bisect, math

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

a = []

b = []

for k in range(N):

    x, y = list(map(int, input().split()))

    a.append(x)

    b.append(y)



a = sorted(a)

b = sorted(b)



l = N - bisect.bisect_left(b,a[-1])

b = b[::-1]

ans = 0

for k in range(l):

    ans += 1

    H -= b[k]

    if H <= 0:

        print(ans)

        exit(0)



print((ans + math.ceil(H/a[-1])))

import math, sys



def input():

    return sys.stdin.readline()[:-1]



def main():

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

    A = [0 for k in range(N)]

    B = [0 for k in range(N)]

    for k in range(N):

        a, b = list(map(int,input().split()))

        A[k] = a

        B[k] = b

    A = sorted(A)[::-1]

    m = A[0]

    B = sorted(B)[::-1]

    c = 0

    for e in B:

        if e > m:

            c += 1

            H -= e

            if H <= 0:

                print(c)

                exit(0)

        else:

            break

    print((c+math.ceil(H/m)))

if __name__ == '__main__':

    main()

# ABC 085 D
import bisect, math

N, H = list(map(int, input().split()))
a = []
b = []
for k in range(N):
    x, y = list(map(int, input().split()))
    a.append(x)
    b.append(y)
a = sorted(a)
b = sorted(b)
l = N - bisect.bisect_left(b, a[-1])
b = b[::-1]
ans = 0
for k in range(l):
    ans += 1
    H -= b[k]
    if H <= 0:
        print(ans)
        exit(0)
print((ans + math.ceil(H / a[-1])))

import math, sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    N, H = list(map(int, input().split()))
    A = [0 for k in range(N)]
    B = [0 for k in range(N)]
    for k in range(N):
        a, b = list(map(int, input().split()))
        A[k] = a
        B[k] = b
    A = sorted(A)[::-1]
    m = A[0]
    B = sorted(B)[::-1]
    c = 0
    for e in B:
        if e > m:
            c += 1
            H -= e
            if H <= 0:
                print(c)
                exit(0)
        else:
            break
    print((c + math.ceil(H / m)))


if __name__ == "__main__":
    main()

-# ABC 085 D -import bisect, math +import math, sys -N, H = list(map(int, input().split())) -a = [] -b = [] -for k in range(N): -    x, y = list(map(int, input().split())) -    a.append(x) -    b.append(y) -a = sorted(a) -b = sorted(b) -l = N - bisect.bisect_left(b, a[-1]) -b = b[::-1] -ans = 0 -for k in range(l): -    ans += 1 -    H -= b[k] -    if H <= 0: -        print(ans) -        exit(0) -print((ans + math.ceil(H / a[-1]))) + +def input(): +    return sys.stdin.readline()[:-1] + + +def main(): +    N, H = list(map(int, input().split())) +    A = [0 for k in range(N)] +    B = [0 for k in range(N)] +    for k in range(N): +        a, b = list(map(int, input().split())) +        A[k] = a +        B[k] = b +    A = sorted(A)[::-1] +    m = A[0] +    B = sorted(B)[::-1] +    c = 0 +    for e in B: +        if e > m: +            c += 1 +            H -= e +            if H <= 0: +                print(c) +                exit(0) +        else: +            break +    print((c + math.ceil(H / m))) + + +if __name__ == "__main__": +    main()