from collections import deque

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

l=[list(map(int,input().split())) for _ in range(n)]

l.sort(reverse=True)

fa,fb=l[0]

M=max(fa,fb)

if n==1:

	print((max(0,(h-M-1)//fa)+2-(h<=M)))

else:

	cnt=0;tmp=[]

	for _,j in l[1:]:

		if j>fa:

			tmp.append(j)

	b=deque(sorted(tmp))

	lim=len(b)

	while h > M and cnt < lim:

		h-=b.pop()

		cnt+=1

	if len(b)!=0:

		print((cnt+1))

	else:

		print((cnt+max(0,(h-M-1)//fa)+2-(h<=M)))
n,h,*l=list(map(int,open(0).read().split()))

a=max(l[::2])

c=0;f=1

for b in sorted(l[1::2])[::-1]:

	if b>a:

		h-=b

		c+=1

		if h<1:

			f=0

			break

print((c+(~-h//a+1)*f))
from collections import deque

n, h = list(map(int, input().split()))
l = [list(map(int, input().split())) for _ in range(n)]
l.sort(reverse=True)
fa, fb = l[0]
M = max(fa, fb)
if n == 1:
    print((max(0, (h - M - 1) // fa) + 2 - (h <= M)))
else:
    cnt = 0
    tmp = []
    for _, j in l[1:]:
        if j > fa:
            tmp.append(j)
    b = deque(sorted(tmp))
    lim = len(b)
    while h > M and cnt < lim:
        h -= b.pop()
        cnt += 1
    if len(b) != 0:
        print((cnt + 1))
    else:
        print((cnt + max(0, (h - M - 1) // fa) + 2 - (h <= M)))

n, h, *l = list(map(int, open(0).read().split()))
a = max(l[::2])
c = 0
f = 1
for b in sorted(l[1::2])[::-1]:
    if b > a:
        h -= b
        c += 1
        if h < 1:
            f = 0
            break
print((c + (~-h // a + 1) * f))

-from collections import deque - -n, h = list(map(int, input().split())) -l = [list(map(int, input().split())) for _ in range(n)] -l.sort(reverse=True) -fa, fb = l[0] -M = max(fa, fb) -if n == 1: -    print((max(0, (h - M - 1) // fa) + 2 - (h <= M))) -else: -    cnt = 0 -    tmp = [] -    for _, j in l[1:]: -        if j > fa: -            tmp.append(j) -    b = deque(sorted(tmp)) -    lim = len(b) -    while h > M and cnt < lim: -        h -= b.pop() -        cnt += 1 -    if len(b) != 0: -        print((cnt + 1)) -    else: -        print((cnt + max(0, (h - M - 1) // fa) + 2 - (h <= M))) +n, h, *l = list(map(int, open(0).read().split())) +a = max(l[::2]) +c = 0 +f = 1 +for b in sorted(l[1::2])[::-1]: +    if b > a: +        h -= b +        c += 1 +        if h < 1: +            f = 0 +            break +print((c + (~-h // a + 1) * f))