n,m = gets.split.map(&:to_i)
abs = n.times.map { gets.split.map(&:to_i) }
price = 0
abs.sort_by{|ab| ab[0] }.each do |ab|
  cost,count = ab
  how_many_to_buy = [m,count].min
  m -= how_many_to_buy
  price += how_many_to_buy * cost
  if m == 0
    puts price
    exit
  end
end
