N,H = map(int,input().split())
a_list=[]
b_list=[]
cnt = 0
for i in range(N):
  a,b = map(int,input().split())
  a_list.append(a)
  b_list.append(b)
sum_b = sum(b_list)
if sum_b < H:
  A = max(a_list)
  for i in range(N):
    if b_list[i] - A < 0:
      cnt += A - b_list[i]
  print(N-(-(H - sum_b - cnt)//A))
else:
  c = sorted(b_list)
  i = 0
  k = 0
  while k < H:
    k += c[N-1-i]
    i += 1
  pprint(i)