N,M=(int(x) for x in input().split())
a=[0]*(N+1)
b=[0]*(N+1)
c=0
v=0
i=0

for i in range(N):
    A,B=(int(x) for x in input().split())
    a[i]=A
    b[i]=B

for i in range(N):
    if v<=a[i]:
        v=a[i]
i=N
#ソート開始
b.sort()
#ソート終了
#print(i,b[i],v,M,N)
while b[i]>=v and M>=0 and i<=N:
    #print(c,b[i],M)
    M-=b[i]
    i-=1
    c+=1
while M>0:
    #print(c,v,M)
    M-=v
    c+=1
print(c)