const main = (input) => {
  const inputs = input.trim().split('\n');
  const N = Number.parseInt(inputs[0].split(" ")[0]);
  var M = Number.parseInt(inputs[0].split(" ")[1]);

  var shops = [];
  for(var i=1;i<=N;i++){
    var obj = {
      pri: Number(inputs[i].split(" ")[0]),
      num: Number(inputs[i].split(" ")[1]),
    };
    shops.push(obj);
  }
  shops = shops.sort(function(a,b){return a.pri-b.pri});
  var ans = 0;
  for(var i=0;M>0;i++){
    var num = Math.min(M, shops[i].num);
    ans += num*shops[i].pri;
    M -= num;
  }
  console.log(ans);
}

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