N, M = gets.split.map(&:to_i)
A = []
B = []
N.times do
    line = gets.split.map(&:to_i)
    A << line.shift
    B << line.shift
end
money = 0
while M > 0
    A_min = A.min
    A_min_index = A.index(A_min)
    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