N, M = gets.split.map(&:to_i)
ab = []
N.times do
  ab.push gets.split.map(&:to_i)
end
abH = Hash.new(0)
ab.each do |a, b|
  abH[a] += b
end

sum = 0

m = M
abH.keys.sort.each do |a|
  if m > abH[a]
    sum += a * abH[a]
    m -= abH[a]
  else
    sum += a * m
    break
  end
end

ans = sum
print("#{ans}\n")
