N, M = gets.split.map(&:to_i)
A = []
N.times do
    A << gets.split.map(&:to_i)
end
money = 0
A.sort!
while M > 0
    A_tmp = A.shift
    A_min = A_tmp[0]
    drink_amount = A_tmp[1]
    if M > drink_amount
        money += A_min * drink_amount
    else
        money += A_min * M
    end
    M -= drink_amount
end
puts money