'use strict'

var AB;
var buff = [];

function sortData(start,end)
{
	if(start >= end) return;
	var mid = Math.floor((start + end) / 2);
	sortData(start,mid);
	sortData(mid+1,end);
	var p = 0;
	for (i=start; i<=mid; i++) buff[p++] = AB[i];
	var i = mid + 1;
	var j = 0;
	var k = start;
	while ((i<=end) && (j<p))
	{
		if (buff[j] <= AB[i])
		{
			AB[k++] = buff[j++];
		}else{
			AB[k++] = AB[i++];
		}
	}
	while (j < p) AB[k++] = buff[j++];
}

function Main(input){
	let temp = input.trim().split("\n");
	let NM = temp[0].split(" ").map( (v)=>(parseInt(v)) );
	AB = new Array(NM[0]);
	buff = 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);
	sortData(0,AB.length-1);

	let count = NM[1];
	let money = 0;
	for(let i=0;i<NM[0];i++){
		if(AB[i][1] < count){
			//全部加算
			money += AB[i][0] * AB[i][1];
			count -= AB[i][1];
		} else {
			money += AB[i][0] * count;
			break;
		}
	}
	console.log(money);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));