n,m = gets.chomp.split(' ').map(&:to_i)
count = 0
money = 0
shops = []
n.times do
  shops.push(gets.chomp.split(' ').map(&:to_i))
end
shops.sort!
while count < m
  if count + shops[0][1] > m
      money += shops[0][0] * (m - count)
      break
  else
    money += shops[0][0] * shops[0][1]
    count += shops[0][1]
  end
  shops.delete_at(0)
end
puts money
