"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const M = parseInt(arg[0].split(" ")[1]);
    let AB = arg.slice(1, N + 1).map(n=>n.split(" ").map(l=>parseInt(l)));
    
    // 安い順集めれば良い
    AB = AB.sort((a,b)=>a[0] - b[0]);
    
    let now = 0;
    let nowAmount = 0;
    
    for(let i=0; i<N; i++) {
        const cost = AB[i][0];
        const amount   = AB[i][1];
        
        // console.log(amount);
        // console.log(cost);
        
        if(nowAmount + amount <= M) {
            now += amount * cost;
            nowAmount += amount;
        } else {
            const rest = M - nowAmount;
            now += rest * cost;
            nowAmount += rest;
            break;
        }
    }
    
    console.log(now)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));