"use strict";
const main = input => {
    const n = parseInt(input[0].split(' ')[0], 10);
    let m = parseInt(input[0].split(' ')[1], 10);
    let arr = new Array(n);
    let ans = 0;
    for(let i=0; i<n; i++) {
        arr[i] = new Array(2);
        arr[i][0] = parseInt(input[i+1].split(' ')[0], 10);
        arr[i][1] = parseInt(input[i+1].split(' ')[1], 10);
    }
    arr = arr.sort((p,q) => p[0]-q[0]);
    // console.log(arr);
    for(let i=0; i<n; i++) {
        if (arr[i][1]<=m) {
            m-=arr[i][1];
            ans+=arr[i][0]*arr[i][1];
        } else {
            ans+=arr[i][0]*m;
            break;
        }
    }
    console.log(ans);
    
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));