n, m = gets.split.map(&:to_i)
multiple_array = n.times.map {gets.split.map(&:to_i)}.sort_by! { |a, b| a }
ans = 0

multiple_array.each do |a, b|
  buy = 0
  if m >= b
    ans += a * b
    m -= b
  else
    ans += a * m
    m = 0
  end
  break if m == 0
end

puts ans