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

ans = 0
rest = m

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

  break if rest == 0
end

puts ans
