'use strict'

function Main(input) {
  const N = Number(input.split("\n")[0].split(" ")[0])
  let M = Number(input.split("\n")[0].split(" ")[1])
  const shopList = input.split("\n").slice(1).map(x => x.split(" ").map(x => Number(x))).sort((a, b) => a[0] - b[0])
  
  let ans = 0
  for (const shop of shopList) {
    if (shop[1] < M) {
      ans += shop[0] * shop[1]
      M -= shop[1]
    } else {
      ans += shop[0] * M
      break
    }
  }
  
  console.log(ans)
}

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