require 'set'
require 'pp'

N, M = gets.chomp!.split(" ").map(&:to_i)

values = SortedSet.new
counter = {
    # value => count
}

N.times do |i|
    a, b = gets.chomp!.split(" ").map(&:to_i)
    counter[a] = (counter[a] || 0) + b
    values << a
end

buy = 0
sum = 0
values.each do |val|
    if buy + counter[val] >= M
        sum += (M - buy) * val
        break
    end

    sum += val * counter[val]
    buy += counter[val] 
end

puts sum
