n,h = gets.split.map(&:to_i)

ab = []
n.times {ab << gets.split.map(&:to_i)}
ab.sort!{|x,y| -x[0] <=> -y[0]}

b = []
s = 0
loop do
    s,t = ab.shift
    b << t
    break if (ab == [] || ab[0][0] != s)
end
b.sort!.reverse

ab.sort!{|x,y| -x[1] <=> -y[1]}
sum = 0
ans = 0
while sum < h
    ans += 1
    
    if ab == [] || ab[0][1] < s
        if b.size == 1 && sum + b[0] < h
            k = (h - b[0] - sum) / s + 1
            sum += s * k
            ans += k - 1
        else
            sum += b.shift
        end
    else
        sum += ab[0][1]
        ab.shift
    end

end

ans -= 1 if sum - s == h
puts ans