import java.math.*

fun main(args: Array<String>) {
    val (n, m) = readInputLine().split(" ").map{it.toLong()}
    
    val shopList = mutableListOf<Pair<Long, Long>>()
    
    for (i in LongRange(1L, n)) {
        val (a, b) = readInputLine().split(" ").map{it.toLong()}
        shopList.add(Pair(a, b))
    }
    
    shopList.sortBy{it.first}

    var ans = 0L
    var bought = 0L
    
    for (shop in shopList) {
        val (a, b) = shop
        
        val buyNum = Math.min(m - bought, b)
        
        ans += a * buyNum
        bought += buyNum
        if (bought == m) {
            break
        }
    }
    
    println(ans)
}

fun readInputLine(): String {
    return readLine()!!
}
