N, M = gets.split().map(&:to_i)
A, B = [], []
N.times do
  a, b = gets.split().map(&:to_i)
  A << a
  B << b
end

bottle = 0
price = 0

until B.empty?
	i = A.index(A.min)
	if bottle + B[i] >= M
		price += (M - bottle) * A[i]
		break
	else
		bottle += B[i]
		price += A[i] * B[i]
		A.delete_at(i)
		B.delete_at(i)
	end
end

p price