n, m = gets.split.map(&:to_i)
shop = []
ans  = 0

n.times do
  shop << gets.split.map(&:to_i)
end
shop.sort!

while m > 0
  if m >= shop[0][1]
    ans += shop[0][0] * shop[0][1]
    m   -= shop[0][1]
    shop.shift
  else
    ans += shop[0][0] * m
    break
  end
end

puts ans
