n, count = gets.strip.split.map(&:to_i)

h = {}
n.times do |i|
  amount, number = gets.strip.split.map(&:to_i)
  h[amount] = number
end

sum = 0
hs = h.sort
hs.each do |d|
  if count >= d[1]
    sum += d[0] * d[1]
    count -= d[1]
  else
    sum += d[0] * count
    count = 0
  end
  break if count <= 0
end
puts sum