import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val n = sc.nextLong()
  val m = sc.nextLong()
  val ab = (1..n).map { Pair(sc.nextLong(), sc.nextLong()) }

  val map = mutableMapOf<Long, Long>()
  for (abi in ab) {
    val a = abi.first
    val b = abi.second
    val tmp = map.getOrElse(a) { 0 }
    map.put(a, b + tmp)
  }

  val keys = map.keys.sorted()
  var count = 0L
  var ans = 0L
  for (key in keys) {
    val value = map.getOrElse(key) { 0 }
    if (count + value >= m) {
      val tmp = count + value - m
      val cost = key * (value - tmp)
      ans += cost
      break
    }
    count += value
    ans += value * key
  }

  println(ans)
}
