from itertools import accumulate

from bisect import bisect_left

from math import ceil



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

A = []

B = []

for _ in range(N):

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

    A.append(a)

    B.append(b)

    

# 最も強いaを探す

a_max = max(A)



# それ以上のbを探す

b_strong = []

for b in B:

    if b >= a_max:

        b_strong.append(b)

        

# bをソートしてcum作る

b_strong.sort(reverse=True)

b_cum = list(accumulate(b_strong))

b_cum = [0] + b_cum

    

# もしHPがb_cum[-1]なら投げてるうちに倒せる

if H <= b_cum[-1]:

    ans = bisect_left(b_cum, H)

    

else:

    ans = len(b_cum) - 1

    ans += ceil((H - b_cum[-1]) / a_max)

    

print(ans)
import sys

stdin = sys.stdin



sys.setrecursionlimit(10**5) 

 

def li(): return list(map(int, stdin.readline().split()))

def li_(): return [int(x)-1 for x in stdin.readline().split()]

def lf(): return list(map(float, stdin.readline().split()))

def ls(): return stdin.readline().split()

def ns(): return stdin.readline().rstrip()

def lc(): return list(ns())

def ni(): return int(stdin.readline())

def nf(): return float(stdin.readline())



n,h = li()

alis = []

blis = []

for _ in range(n):

    a,b = li()

    alis.append(a)

    blis.append(b)

    

amax = max(alis)

blis.sort()

buse = []

while blis:

    cur = blis.pop()

    if cur > amax:

        buse.append(cur)

    

cnt = 0

res = h

for b in buse:

    res -= b

    cnt += 1

    if res <= 0:

        break

    

if res > 0:

    cnt += -(-res//amax)

    

print(cnt)
from itertools import accumulate
from bisect import bisect_left
from math import ceil

N, H = list(map(int, input().split()))
A = []
B = []
for _ in range(N):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
# 最も強いaを探す
a_max = max(A)
# それ以上のbを探す
b_strong = []
for b in B:
    if b >= a_max:
        b_strong.append(b)
# bをソートしてcum作る
b_strong.sort(reverse=True)
b_cum = list(accumulate(b_strong))
b_cum = [0] + b_cum
# もしHPがb_cum[-1]なら投げてるうちに倒せる
if H <= b_cum[-1]:
    ans = bisect_left(b_cum, H)
else:
    ans = len(b_cum) - 1
    ans += ceil((H - b_cum[-1]) / a_max)
print(ans)

import sys

stdin = sys.stdin
sys.setrecursionlimit(10**5)


def li():
    return list(map(int, stdin.readline().split()))


def li_():
    return [int(x) - 1 for x in stdin.readline().split()]


def lf():
    return list(map(float, stdin.readline().split()))


def ls():
    return stdin.readline().split()


def ns():
    return stdin.readline().rstrip()


def lc():
    return list(ns())


def ni():
    return int(stdin.readline())


def nf():
    return float(stdin.readline())


n, h = li()
alis = []
blis = []
for _ in range(n):
    a, b = li()
    alis.append(a)
    blis.append(b)
amax = max(alis)
blis.sort()
buse = []
while blis:
    cur = blis.pop()
    if cur > amax:
        buse.append(cur)
cnt = 0
res = h
for b in buse:
    res -= b
    cnt += 1
    if res <= 0:
        break
if res > 0:
    cnt += -(-res // amax)
print(cnt)

-from itertools import accumulate -from bisect import bisect_left -from math import ceil +import sys -N, H = list(map(int, input().split())) -A = [] -B = [] -for _ in range(N): -    a, b = list(map(int, input().split())) -    A.append(a) -    B.append(b) -# 最も強いaを探す -a_max = max(A) -# それ以上のbを探す -b_strong = [] -for b in B: -    if b >= a_max: -        b_strong.append(b) -# bをソートしてcum作る -b_strong.sort(reverse=True) -b_cum = list(accumulate(b_strong)) -b_cum = [0] + b_cum -# もしHPがb_cum[-1]なら投げてるうちに倒せる -if H <= b_cum[-1]: -    ans = bisect_left(b_cum, H) -else: -    ans = len(b_cum) - 1 -    ans += ceil((H - b_cum[-1]) / a_max) -print(ans) +stdin = sys.stdin +sys.setrecursionlimit(10**5) + + +def li(): +    return list(map(int, stdin.readline().split())) + + +def li_(): +    return [int(x) - 1 for x in stdin.readline().split()] + + +def lf(): +    return list(map(float, stdin.readline().split())) + + +def ls(): +    return stdin.readline().split() + + +def ns(): +    return stdin.readline().rstrip() + + +def lc(): +    return list(ns()) + + +def ni(): +    return int(stdin.readline()) + + +def nf(): +    return float(stdin.readline()) + + +n, h = li() +alis = [] +blis = [] +for _ in range(n): +    a, b = li() +    alis.append(a) +    blis.append(b) +amax = max(alis) +blis.sort() +buse = [] +while blis: +    cur = blis.pop() +    if cur > amax: +        buse.append(cur) +cnt = 0 +res = h +for b in buse: +    res -= b +    cnt += 1 +    if res <= 0: +        break +if res > 0: +    cnt += -(-res // amax) +print(cnt)