N, M = gets.split().map(&:to_i)
array = []
N.times do
	array << [:price, :bottle].zip(gets.split().map(&:to_i)).to_h
end

array.sort! {|p,n| p[:price] <=> n[:price]}
cost = 0
bought_bottle = 0

until array.empty?
	if bought_bottle + array.first[:bottle] >= M
		cost += (M - bought_bottle) * array.first[:price]
		break
	else
		bought_bottle += array.first[:bottle]
		cost += array.first[:price] * array.first[:bottle]
		array.shift(1)
	end
end

p cost