n, m = gets.split.map(&:to_i)

stores = n.times.map{|i| 
    gets.split.map(&:to_i)
}.sort_by{|it| it[0]}

spent = 0
to_buy = m
stores.each{|price, count|
    if count >= to_buy
        spent += to_buy * price
        break
    else
        spent += count * price
        to_buy -= count
    end
}

puts spent
