n,m = gets.chomp.split.map{|i|i = i.to_i}
a, b=[],[]
n.times do|i|
  arr = gets.chomp.split.map{|i|i = i.to_i}
	a << arr[0]
	b << arr[1]
end
puts "a = #{a}"
puts "b = #{b}"
puts "b.index(b.min) = #{b.index(b.min)}"

drink_num=0
sum_money=0
while drink_num<m do
	i=a.index(a.min)
	if (m-drink_num) < b[i] then
		sum_money += (m - drink_num) * a[i]
		break
	else
		drink_num += b[i]
		sum_money += b[i] * a[i]
		a.delete_at(i)
		b.delete_at(i)
	end
	#puts "now b = #{b}"
end
#puts "drink_num=#{drink_num}, sum_money=#{sum_money}"
puts sum_money