n,m = gets.split.map(&:to_i)
set = []
n.times do
  set << gets.split.map(&:to_i)
end
set.sort_by!{|k,v| k}
sum = 0
set.each do |a,b|
  if m-b >= 0
    sum += a*b
    m -= b
  else
    sum += a*m
    break
  end
end
puts sum
