import scala.collection.immutable.TreeMap

object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    val m = sc.nextInt
    val map : TreeMap[Long,Int] = (1 to n).foldLeft[TreeMap[Long,Int]](TreeMap.empty)((map, _) => {
      val x = sc.nextLong
      val y = sc.nextInt
      map.updated(x, map.getOrElse(x,0) + y)
    })

    val end : (BigDecimal,Int) = map.foldLeft[(BigDecimal,Int)]((0, m)){case ((sum, toBuy),(x,y)) => {
      if(toBuy == 0) (sum,0)
      else{
        val buying = Math.min(toBuy, y)
        (sum + x*buying, toBuy - buying)
      }
    }}
    println(end._1)
  }

}