'use strict'

function quickSort2(array) {
    (function sort(start, end) {
        if(start >= end) {
            return;
        }
        var reference = array[start];
        var left = start + 1;
        var right = end;
 
        while(left < right) {
            if(array[left][0] > reference[0]) {
                while(right > left) {
                    if(array[right][0] <= reference[0]) {
                        var tmp = array[left][0];
                        array[left][0] = array[right][0];
                        array[right][0] = tmp;
                        right--;
                        break;
                    }
                    right--;
                }
            }
            left++;
        }
        var center;
        if(array[right][0] > reference[0]) {
            center = right - 1;
        }else {
            center = right;
        }
        array[start] = array[center];
        array[center] = reference;
 
        sort(start, center - 1);
        sort(center + 1, end);
    })(0, array.length - 1);
 
    return array;
}

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);
	quickSort2(AB);

	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"));