n,m = gets.split(" ").map{|e| e.to_i}
array = []
n.times do
  array << gets.split(" ").map{|e| e.to_i}
end

array.sort_by!{|a| a[0]}
sum = 0
loop do
  if m > array[0][1]
    sum += array[0][0]*array[0][1]
    m -= array[0][1]
    array.shift
  else
    sum += array[0][0]*m
    break
  end
end

puts sum