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

ab = []
N.times do
  ab << gets.chomp.split(" ").map(&:to_i)
end

ab.sort_by!{|x| x[0]}


mrem = M
ans = 0

N.times do |i|
  a, b = ab[i]
  buy = [mrem, b].min
  ans += a * buy
  mrem -= buy
  if mrem == 0
    puts ans
    exit
  end
end