N, M = gets.split.map(&:to_i)
A, B = N.times.map{gets.split.map(&:to_i)}.transpose
money = 0
while M > 0
    A_min = A.min
    A_min_index = A.each_with_index.min[1]
    drink_amount = B[A_min_index]
    if M > drink_amount
        money += A_min * drink_amount
    else
        money += A_min * M
    end
    M -= drink_amount
    A.delete_at(A_min_index)
    B.delete_at(A_min_index)
end
puts money