N, M = gets.chomp.split(" ").map(&:to_i)
D = []
N.times{
  D << gets.chomp.split(" ").map(&:to_i)
}

D.sort_by!{|a, b| a}
ans, rst = [0, M]
while rst > 0 do
  a, b = D.shift
  if rst >= b then
    ans += a * b
    rst -= b
  else
    ans += a * rst
    rst = 0
  end
end

puts ans
