NH = input().split()
N = int(NH[0])
H = int(NH[1])
a = []
b = []
for v in range(N):
    L = input().split()
    a.append(L[0])
    b.append(L[1])
a = list(map(int, a))
b = list(map(int, b))
a.sort(reverse = True)
b.sort(reverse = True)
c = 0
count = 0
while c < H:
    if a[0] >= b[0] or len(b) == 0:
        c = c + a[0]
        count = count + 1
    else:
        c = c + b.pop(0)
        count = count + 1 
print(count)