n, m = gets.split.map &:to_i

drink = {}

pay = 0

a = []
b = []

n.times {
	a_t, b_t = gets.split.map &:to_i
	a << a_t
	b << b_t
}

index = (0...n).to_a.sort{ |p, q| a[p] <=> a[q] }

index.each{ |i|
	if b[i] >= m then
		pay += a[i] * m
		break
	else
		m -= b[i]
		pay += a[i] * b[i]
	end
}

puts pay