from bisect import bisect_right
from math import ceil

n, h = map(int, input().split())
A = []
B = []
for _ in range(n):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
B_sorted = sorted(B)
B_cumulative_sum = list(B_sorted)
for i in range(n - 2, -1, -1):
    B_cumulative_sum[i] += B_cumulative_sum[i + 1]
    if B_cumulative_sum[i] > h:
        print(n - i)
        exit()
cnt = int(1e9)
for a, b in zip(A, B):
    target_idx = bisect_right(B_sorted, a)
    throws = n - target_idx
    hp_remains_after_throw = h - B_cumulative_sum[target_idx]
    attacks = ceil(hp_remains_after_throw / a)
    cnd = throws + attacks
    cnt = min(cnt, cnd)
print(cnt)
