'use strict'

function Main(input){
	let temp = input.trim().split("\n");
	let NM = temp[0].split(" ").map( (v)=>(parseInt(v)) );
	//let AB = new Array(NM[0]);
	//for(let i=0;i<NM[0];i++){
	//	AB[i] = temp[i+1].split(" ").map( (v)=>(parseInt(v)) );
	//}

	let AB = [];
	for(let i=0;i<NM[0];i++){
		var obj = {
			a : Number(temp[i+1].split(" ")[0]),
			b : Number(temp[i+1].split(" ")[1])
		};
		AB.push(obj);
	}
	AB.sort((x,y)=>(x.a - y.a));

	let money = 0;
	let count = NM[1];
	for(let i=0;count>0;i++){
		var num = Math.min(count,AB[i].b);
		money += num*AB[i].a;
		count -= num;
	}
	console.log(money);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));