n, m = gets.split.map(&:to_i)
abs = []
n.times do |_ni|
  abs << gets.split.map(&:to_i)
end

abs.sort_by! { |a| a[0] }
total_price = 0
count = 0
abs.each do |ab|
  if count + ab[-1] < m
    total_price += ab[0] * ab[-1]
    count += ab[-1]
  else
    total_price += ab[0] * (m - count)
    break
  end
end
puts total_price