'use strict'
function main(input) {
  input = input.trim().split('\n').map(r => r.split(' ').map(v => Number(v)))
  const NM = input.shift()
  input = input.sort((a, b) => a[0] - b[0])
  let count = NM[1]
  let pay = 0
  for (let i = 0; i < NM[0]; i++) {
    if (count >= input[i][1]) {
      count -= input[i][1]
      pay += input[i][1] * input[i][0]
    } else {
      pay += count * input[i][0]
      break
    }
  }
  console.log(pay);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
