N, M = gets.split.map(&:to_i)

shops = []
N.times do
  a, b = gets.split.map(&:to_i)
  shops << [a, b]
end

shops.sort_by! {|s| s[0]}

num = 0
money = 0
shops.each do |shop|
  if M <= num + shop[1]
    money += (M - num) * shop[0]
    num += M - num
    break
  else
    num += shop[1]
    money += shop[1] * shop[0]
  end
end

puts money
