n,h=map(int,input().split())
H=h
X=[]
for i in range(n):
    a,b=map(int,input().split())
    X.append([a,-b])
    
X.sort(key=lambda x:(x[0],x[1]),reverse=True)
Y=sorted(X,key=lambda x:x[1])

cnt=0

for i in range(n):
    if X[i][1]<=X[0][1]:
        h+=X[i][1]
        cnt+=1
        if h<=0:
            break

if h>0:
    cnt+=h//X[0][0]

CNT=0
for i in range(n):
    H+=X[i][1]
    CNT+=1
    if H<=0:
        break


print(min(cnt,CNT))