object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val ls = in.map(_.split(' ').map(_.toLong).toSeq)
  val N = ls(0)(0)
  val M = ls(0)(1)
  val l = ls.tail
  val sorted = l.sortBy(_(0)).toArray
  
  var m = M
  var ret = 0L
  var i = 0
  while(m>0){
    val t = sorted(i)
    val a = t(0)
    val b = t(1)
    val qty = Math.min(m, b)
    ret += qty * a
    m -= qty
    i += 1
  }
  println(ret)
}
