n,m = [int(i) for i in input().split()]
l = sorted([[int(i) for i in input().split()] for _ in range(n)],key = lambda x: (x[1]))

min_atk = l[0][0]
ct = 0
for i in range(len(l)-1,0,-1):
    if l[i][1] >= min_atk and m >= 0:
        m -= l[i][1]
        ct += 1
    else:
        break
    

if m < 0:
    print(ct)
else:
    ct += m//min_atk
    
print(ct)

