'use strict'
const main = (sdi) => {
  const line = sdi.split("\n");
  const temp = line.shift().split(" ");
  const N = temp[0]-0;
  let M = temp[1]-0;
  let a = new Array(line.length);
  for(const i in line){
    a[i] = line[i].split(" ").map( str => parseInt(str, 10) );
  }
  a.sort((a,b) => {
    return(a[0] - b[0]);
  });
  let money = 0;
  let buy = 0;
  for(const i in a){
    if(M === 0) break;
    buy = Math.min(a[i][1], M);
    money = money + (a[i][0] * buy);
    M = M - buy;
  }
  console.log(money);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));