n, m = gets.chomp.split.map(&:to_i)
ab = []
n.times do
  ab << gets.chomp.split.map(&:to_i)
end
ab.sort! do |x, y|
  x[0] <=> y[0]
end
sum = 0
rest = m
1.upto(n) do |i|
  x = [rest, ab[i-1][1]].min
  sum += x * ab[i-1][0]
  rest -= x
  if rest <= 0 then
    break
  end
end
puts sum
