'use strict'
function Main(input){
  input=input.trim().split(/\s+/).map(x=>x-0);
  var N=input.shift();
  var M=input.shift();
  var A=[];
  var B=[];
  for(let i=0;i<N;i++){
    A[i]=input[2*i];
    B[i]=input[2*i+1];
  }
   A=binarySearchSort(A);
//  console.log(A);
  var accumulatedCost=0;
  var i=0;
   while(M>=B[A[i][1]]){
     M-=B[A[i][1]];
     accumulatedCost+=A[i][0]*B[A[i][1]];
     i++;
   }
  accumulatedCost+=A[i][0]*M;
  console.log(accumulatedCost);
}

function binarySearchSort(arr){
  var N=arr.length;
  var newArr=[[arr[0],0]];
  for(let i=0;i<N;i++){
    let n=newArr.length;
    var d=0,m=0,u=n-1;
    m=Math.floor((d+u)/2);
    while(!(d>u)){
      if(newArr[m][0]<arr[i]){
        d=m+1;
      }else{
        u=m-1;
      }
      m=Math.floor((d+u)/2);
    }
    newArr.splice(m+1,0,[arr[i],i]);
  }
  return newArr;
}

Main(require("fs").readFileSync('/dev/stdin','utf8'));