n, m = gets.chomp.split(" ").map(&:to_i);
arr = n.times.map{gets.split.map(&:to_i)}
arr = arr.sort
ans = 0
index = 0
while m > 0 do
	tmp = [m, arr[index][1]].min
	m -= tmp
	ans += arr[index][0] * tmp
	index += 1
end
puts ans