import math



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

katana = {i: list(map(int, input().split())) for i in range(N)}



# 振り攻撃最大

max_i, (max_a, max_b) = max(list(katana.items()), key=lambda x: x[1][0])



ans = 0

for i, (_, b) in sorted(list(katana.items()), key=lambda x: x[1][1], reverse=True):

    if i == max_i:

        continue

    if H <= max_b or H <= max_a:

        break

    if b < max_a:

        break

    H -= b

    ans += 1



if max_a < max_b and H > 0:

    H -= max_b

    ans += 1

if H > 0:

    ans += math.ceil(H / max_a)



print(ans)

import sys

input = sys.stdin.readline



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

a, b = [0] * N, [0] * N

for i in range(N):

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



max_a = max(a)

b = [x for x in sorted(b, reverse=True) if x > max_a]



cnt = 0

for bi in b:

    H -= bi

    cnt += 1

    if H <= 0:

        break



if H > 0:

    cnt += H // max_a

    if H % max_a != 0:

        cnt += 1



print(cnt)

import math

N, H = list(map(int, input().split()))
katana = {i: list(map(int, input().split())) for i in range(N)}
# 振り攻撃最大
max_i, (max_a, max_b) = max(list(katana.items()), key=lambda x: x[1][0])
ans = 0
for i, (_, b) in sorted(list(katana.items()), key=lambda x: x[1][1], reverse=True):
    if i == max_i:
        continue
    if H <= max_b or H <= max_a:
        break
    if b < max_a:
        break
    H -= b
    ans += 1
if max_a < max_b and H > 0:
    H -= max_b
    ans += 1
if H > 0:
    ans += math.ceil(H / max_a)
print(ans)

import sys

input = sys.stdin.readline
N, H = list(map(int, input().split()))
a, b = [0] * N, [0] * N
for i in range(N):
    a[i], b[i] = list(map(int, input().split()))
max_a = max(a)
b = [x for x in sorted(b, reverse=True) if x > max_a]
cnt = 0
for bi in b:
    H -= bi
    cnt += 1
    if H <= 0:
        break
if H > 0:
    cnt += H // max_a
    if H % max_a != 0:
        cnt += 1
print(cnt)

-import math +import sys +input = sys.stdin.readline -katana = {i: list(map(int, input().split())) for i in range(N)} -# 振り攻撃最大 -max_i, (max_a, max_b) = max(list(katana.items()), key=lambda x: x[1][0]) -ans = 0 -for i, (_, b) in sorted(list(katana.items()), key=lambda x: x[1][1], reverse=True): -    if i == max_i: -        continue -    if H <= max_b or H <= max_a: +a, b = [0] * N, [0] * N +for i in range(N): +    a[i], b[i] = list(map(int, input().split())) +max_a = max(a) +b = [x for x in sorted(b, reverse=True) if x > max_a] +cnt = 0 +for bi in b: +    H -= bi +    cnt += 1 +    if H <= 0: -    if b < max_a: -        break -    H -= b -    ans += 1 -if max_a < max_b and H > 0: -    H -= max_b -    ans += 1 -    ans += math.ceil(H / max_a) -print(ans) +    cnt += H // max_a +    if H % max_a != 0: +        cnt += 1 +print(cnt)