'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)) );
	}
	AB.sort((a,b)=>(a[0] < b[0]?-1:1));

	let money = 0;
	let count = NM[1];
	for(let i=0;count>0;i++){
		var num = Math.min(count,AB[i][1]);
		money += num*AB[i][0];
		count -= num;
	}
	console.log(money);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));