"use strict";
function Main(input) {
    let lines = input.split("\n");
    let Ln = lines.shift().split(/\s/).map((v) => v - 0);
    let N = Ln[0], M = Ln[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, i = 0;
    D.sort(function(a, b) { return a[0] - b[0]; });
    while (M > 0) {
        if (M < D[i][1]) yen += (M * D[i][0]);
        else yen += (D[i][1] * D[i][0]);
        M -= D[i][1];
        i += 1;
    }
    console.log(yen);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
