n, m = gets.split.map(&:to_i)
abs = n.times.map { gets.split.map(&:to_i) }.sort!

ans = 0

abs.each do |a, b|
  if b >= m
    ans += a * m
    m = 0
  else
    ans += a * b
    m -= b
  end

  break if m == 0
end

puts ans
