N, H = map(int, input().split())
a = []
b = []
for i in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)

b.sort()
A = max(a)
i = int(N / 2 + 0.5) - 1
while True:
    #print(i)
    if A <= min(b):
        break
    if b[i] >= A:
        break
    if b[i] < A:
        i = i + int(i / 2) + 1
    else:
        i = i - int(i / 2)
ans = 0
for j in range(i, N):
    ans += b[j]

H -= ans
ans = N - i
if H > 0:
    ans += (int(H / A + 0.5))
print(ans)