# https://atcoder.jp/contests/abc085/tasks/abc085_d
from bisect import bisect_right
from math import ceil
n, h = map(int, input().split())

cut = []
throw = []
for _ in range(n):
    a, b = map(int, input().split())
    cut.append(a)
    throw.append(b)
throw.sort()
MAX = max(cut)
index = bisect_right(throw, MAX)
throw = throw[index:]

def check(MAX, throw, m, h):
    attack = 0
    for i in range(len(throw)):
        h -= throw[i]
        attack += 1
    if h > 0:
        attack += ceil(h / MAX)
    if attack <= m:
        return True
    return False

l = 0
r = 10 ** 9
ans = 10 ** 9
while l <= r:
    mid = (l + r) // 2
    if check(MAX, throw, mid, h):
        r = mid - 1
        ans = min(ans, mid)
    else:
        l = mid + 1
print(ans)