nm = gets.chomp.split
n = nm[0].to_i
m = nm[1].to_i

a = []
b = []
n.times do
  ab = gets.chomp.split
  a << ab[0].to_i
  b << ab[1].to_i
end

a_sorted = a.sort

money = 0
drinks = 0
m.times do |i|
  store_index = a.index(a_sorted[i])
  price = a[store_index]
  drink = b[store_index]

  if drinks + drink <= m
    drinks += drink
    money += (drink * price)
  else
    money += ((m - drinks) * price)
    break
  end
end

puts money