# frozen_string_literal: true

def show(x)
  puts x
end

def solve(n,h,sum_b,max_a)
  # p 'max_a', max_a
  # p 'sum_b', sum_b
  c = h-sum_b.to_f
  # p 'c', c
  d = (c / max_a).ceil
  # p 'd', d
  n + d
end

def read
  n, h = gets.split.map(&:to_i)
  sum_b = 0
  as = []
  n.times do
    a, b = gets.split.map(&:to_i)
    sum_b += b
    as << a
  end
  [n,h,sum_b,as.max]
end

show solve *read

