
function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input);
	//input = input.trim().split(" ");
	input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var N = parseInt(input[0].split(" ")[0]);
  var M = parseInt(input[0].split(" ")[1]);
  var output = 0;
  var list = [];
  for(var i = 1; i <= N; i++){
    var tmp = input[i].split(" ").map((a)=>Number(a));
    var obj = {};
    obj["a"] = tmp[0];
    obj["b"] = tmp[1];
    list.push(obj);
  }
  list.sort(function(a,b){
  	return a["a"] - b["a"];
  });
  
  
  for(var i = 0; i < N; i++){
    output += list[i]["a"] * Math.min(M, list[i]["b"]);
    M = M - list[i]["b"];
    if(M <= 0){
       break;
       }
  }
  myout(output);
}

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