def inpl(): return [int(i) for i in input().split()]

N, H = inpl()
maxa = 0
B = []
for i in range(N):
    a, b = inpl()
    B.append(b)
    maxa = max(maxa,a)
B = sorted(B)
ctr = N
for i in range(N):
    if maxa <= B[i]:
        ctr = i
        break
M = H - sum(B[ctr:])
ans = -(-M//maxa)+N-ctr
if ans <= 0: ans = 1
ctr = 0
for i in range(N-1,-1,-1):
    ctr += 1 
    H -= B[i]
    if H <= 0:
        break
else:ctr = float('inf')
print(min(abs(ans),ctr))