N, H = map(int, input().split())
a_list = []
b_list = []
for i in range(N):
    a, b = map(int, input().split())
    a_list.append(a)
    b_list.append(b)
count = 0
a_list.sort()
a_list.reverse()
b_list.sort()
b_list.reverse()
while True:
    if len(b_list) >= 1:
        if b_list[0] >= a_list[0]:
            b = b_list.pop(0)
            H -= b
            count += 1
            if H <= 0:
                break
        else:
            a = a_list[0]
            H -= a
            count += 1
            if H <= 0:
                break
    else:
        a = a_list[0]
        H -= a
        count += 1
        if H <= 0:
            break
        
print(count)