info=gets.chomp.split(" ").map(&:to_i)
ab=Array.new(info[0])
info[0].times do|i|
	ab[i]=gets.chomp.split(" ").map(&:to_i)
end
def mysort(_list,_n)
	for i in (0..(_n-2))
		indexmin=i
		for j in (i..(_n-1))
			if(_list[j][0]<_list[indexmin][0])
				indexmin=j
			end
		end
		w=_list[indexmin][0]
		_list[indexmin][0]=_list[i][0]
		_list[i][0]=w

		w=_list[indexmin][1]
		_list[indexmin][1]=_list[i][1]
		_list[i][1]=w
	end
	return _list
end
ab=mysort(ab,info[0])
result=0
info[0].times do|i|
	if(info[1]-ab[i][1]<=0)
		result+=(info[1]*ab[i][0])
		break
	else
		info[1]-=ab[i][1]
		result+=(ab[i][0]*ab[i][1])
	end
end
p result