"use strict";
    
const main = arg => {
    const N = parseInt(arg.split("\n")[0].split(" ")[0]);
    const M = parseInt(arg.split("\n")[0].split(" ")[1]);
    const temp = arg.split("\n").slice(1);
    
    let obj = [];
    
    for(let i in temp) {
        obj[i] = {};
        obj[i].price = temp[i].split(" ")[0];
        obj[i].stock = temp[i].split(" ")[1];
    }
    
    //小さい順から買っていく
    obj.sort((a,b)=>(a.price - b.price));
    
    let done = 0;
    let need = M;
    let ans  = 0;
    
    for(let i in obj) {
        if(obj[i].stock < need) {
            ans += parseInt(obj[i].price * obj[i].stock);
            done += parseInt(obj[i].stock);
            need -= parseInt(obj[i].stock);
        } else {
            ans += parseInt(obj[i].price * need);
            done += parseInt(need);
            console.log(ans);
            return;
        }
        if(done>=M) {
            console.log(ans);
            return;
        }
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));