n,m = gets.split(" ").map(&:to_i)

drink_place = 0
drink_num = 0

shop = []

n.times do |n_c|

  a,b = gets.split(" ").map(&:to_i)
  shop << [a,b]
end

shop.sort!

shop.each do |shop|
  drink_place += (shop[1] * shop[0])
  t = m - (drink_num + shop[1])
  
  if t <= 0
    drink_place += (t * shop[0])
    break
  end

  drink_num += shop[1]

end

puts drink_place
