N,H=map(int,input().split())

d=[]
for _ in range(N):
    d.append(list(map(int,input().split())))

d.sort(key=lambda x:x[0],reverse=True)
a,b = d[0]
del d[0]

d.sort(key=lambda x:x[1],reverse=True)

b_damage=[]
i=0
dam=0
if len(d)>0:
    while d[i][1]>a:
        dam+=d[i][1]
        b_damage.append(dam)
        i+=1
        if i==len(d):
            break

r = H//a + 1
l = 0

def damage(k):
    if k==0:
        return 0
    elif k<len(b_damage)+1:
        return b_damage[k-1]
    elif len(b_damage)==0:
        return a*(k-1)+b
    else:
        l=k-len(b_damage)
        return b_damage[-1]+a*(l-1)+b


while r-l!=1:
    mid=(r+l)//2
    dam = damage(mid)
    if dam >= H:
        r=mid
    else:
        l=mid
print(r)


