n,h=map(int,input().split())
a_l=[]
b_l=[]
c=0
for i in range(n):
  a,b=map(int,input().split())
  a_l.append(a)
  b_l.append(b)
a_l.sort()
b_l.sort()
for i in range(1,n+1):
  if a_l[-1]<=b_l[(-1)*i]:
    h-=b_l[(-1)*i]
    c+=1
    if h<=0:
      break
  else:
    break
while h>0:
  h-=a_l[-1]
  c+=1
print(c)