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

money = 0
drinks = 0
while drinks < m
  store_index = a.index(a.min)
  price = a[store_index]
  drink = b[store_index]

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

  a.delete_at(store_index)
  b.delete_at(store_index)
end

puts money