=begin
N M
A1 B1
...
An Bn
=end

n, m = gets.chomp.split(" ").map(&:to_i)

abs = n.times.map do
  gets.chomp.split(" ").map(&:to_i)
end

abs.sort_by! do |a, b|
  a
end

cost = 0
drinks = 0

abs.each do |a, b|
  if drinks + b >= m
    cost += (m - drinks) * a
    break
  else
    drinks += b
    cost += b * a
  end
end

puts cost
