n, m = gets.chomp.split.map(&:to_i)
arr = Array.new(n)
n.times do |i|
	arr[i] = gets.chomp.split.map(&:to_i)
end

arr = arr.sort{|a,b| a[0] <=> b[0]}
mon = 0
cnt = 0
n.times do |i|
	if arr[i][1] + cnt >= m
		mon += arr[i][0] * (m - cnt)
		break
	else
		mon += arr[i][0] * arr[i][1]
		cnt += arr[i][1]
	end
end
puts mon

