"use strict";
function Main(input) {
    let lines = input.split("\n");
    let cols = lines.shift().split(/\s/).map((v) => v - 0);
    let N = cols[0], M = cols[1];
    let D = [];
    for (let n = 0; n < N; n++) {
        let An = lines.shift().split(/\s/).map((v) => v - 0);
        D.push([An[0], An[1]]);
    }
    let yen = 0;
    D.sort((a, b) => a[0] - b[0]);
    for (let i = 0; M > 0; i++) {
        yen += (D[i][0] * Math.min(M, D[i][1]));
        M -= D[i][1];
    }
    console.log(yen);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
