while true
  n, m = gets.chomp.split(' ').map(&:to_i)
  break if n == 0 && m == 0
  distance = []
  num = []
  product = []
  n.times do
    input = gets.chomp.split(' ').map(&:to_i)
    distance << input[0]
    num << input[1]
  end

  n.times do |i|
    product << distance[i] * num[i]
  end

  while m > 0
    idx = product.find_index(product.max)
    if m > distance[idx]
      m -= distance[idx]
      distance[idx] = 0
    elsif m == distance[idx]
      m = distance[idx] = 0
    elsif m < distance[idx]
      distance[idx] -= m
      m = 0
    end
    product[idx] = -1
  end
  sum = 0
  n.times do |i|
    sum += distance[i] * num[i]
  end
  puts sum
end