import math

inn = [int(x) for x in input().split()]
aa = []
bb = []
for i in range(inn[0]):
    tmp = [int(x) for x in input().split()]
    aa.append(tmp[0])
    bb.append(tmp[1])

if sum(bb) >= inn[1]:
    tot = 0
    count = 0
    for b in sorted(bb, reverse=True):
        tot += b
        count += 1
        if tot >= inn[1]:
            print(count)
            break
else:
    count = inn[0] + math.ceil((inn[1]-sum(bb))/max(aa))
    print(count)
