function main(input) {
    var i, j, A, ans=0
    var arg = input.split("\n")[0].split(" ")
    //A=new Array(arg[0])
    A=[]
    for (i=0;i<arg[0];++i){
        A.push(input.split("\n")[i+1].split(" "))
    }
    A.sort(function(a,b){return(a[0] - b[0])})
    i=0
    j=0
    while(j<Number(arg[1])){
        if (arg[1]-j < A[i][1]){
            ans += Number(A[i][0])*(arg[1]-j)
            j = arg[1]
        }else{
            ans += Number(A[i][0])*Number(A[i][1])
            j += Number(A[i][1])
            A[i][1]=0
            i++
        }
    }
    console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));