import scala.io.{StdIn => in}

object Main extends App {
  val Array(n, m) = in.readLine.split(" ").map(_.toInt)
  val ab = Iterator.continually(in.readLine)
    .take(n)
    .map(_.split(" ").map(_.toLong))
    .toArray
    .sortBy(e => e(0))
  
  var ans = 0L
  var cnt = 0L
  for(i <- 0 until n if cnt < m) {
    if(cnt+ab(i)(1) < m) {
      ans += ab(i)(0) * ab(i)(1)
      cnt += ab(i)(1)
    }
    else {
      val rem = m - cnt
      ans += ab(i)(0) * rem
      cnt += rem
    }
  }
  // println(m + " " + cnt)
  println(ans)
}