import math

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

slash = []

throw = []

for _ in range(N):

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

    slash.append(a)

    throw.append(b)

count = 0

#print(slash)

slash_max = max(slash)

#print(throw)

throw.sort(reverse = True)

#print(throw)

while H > 0:

    #print(H)

    if not throw or throw[0] < slash_max :

        count += math.ceil(H / slash_max)

        break

    else:

        H -= throw[0]

        throw.pop(0)

        #print(throw)

    count += 1

print(count)

import math



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

a_l = []

b_l = []

for _ in range(N):

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

    a_l.append(a)

    b_l.append(b)



a_l.sort(reverse=True)

b_l.sort(reverse=True)

ans = 0

for i in range(N):

    if a_l[0] >= b_l[i]:

        break

    else:

        ans += 1

        H = max(H - b_l[i], 0)

        if H <= 0:

            break

ans += math.ceil(H / a_l[0])

print(ans)
import math

N, H = list(map(int, input().split()))
slash = []
throw = []
for _ in range(N):
    a, b = list(map(int, input().split()))
    slash.append(a)
    throw.append(b)
count = 0
# print(slash)
slash_max = max(slash)
# print(throw)
throw.sort(reverse=True)
# print(throw)
while H > 0:
    # print(H)
    if not throw or throw[0] < slash_max:
        count += math.ceil(H / slash_max)
        break
    else:
        H -= throw[0]
        throw.pop(0)
        # print(throw)
    count += 1
print(count)

import math

N, H = list(map(int, input().split()))
a_l = []
b_l = []
for _ in range(N):
    a, b = list(map(int, input().split()))
    a_l.append(a)
    b_l.append(b)
a_l.sort(reverse=True)
b_l.sort(reverse=True)
ans = 0
for i in range(N):
    if a_l[0] >= b_l[i]:
        break
    else:
        ans += 1
        H = max(H - b_l[i], 0)
        if H <= 0:
            break
ans += math.ceil(H / a_l[0])
print(ans)

-slash = [] -throw = [] +a_l = [] +b_l = [] -    slash.append(a) -    throw.append(b) -count = 0 -# print(slash) -slash_max = max(slash) -# print(throw) -throw.sort(reverse=True) -# print(throw) -while H > 0: -    # print(H) -    if not throw or throw[0] < slash_max: -        count += math.ceil(H / slash_max) +    a_l.append(a) +    b_l.append(b) +a_l.sort(reverse=True) +b_l.sort(reverse=True) +ans = 0 +for i in range(N): +    if a_l[0] >= b_l[i]: -        H -= throw[0] -        throw.pop(0) -        # print(throw) -    count += 1 -print(count) +        ans += 1 +        H = max(H - b_l[i], 0) +        if H <= 0: +            break +ans += math.ceil(H / a_l[0]) +print(ans)