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

as = []
bs = []
for i in 1..n do
    a,b = gets.split().map(&:to_i)
    as << a
    bs << b
end

sum = 0
ans = 0
for i in 1..n do
    index = as.index(as.min)
    for j in 1..bs[index] do
        sum = sum + 1
        ans = ans + as[index]
        break if sum >= m
    end
    if sum >= m then
        p ans
        break
    end
    as.delete_at(index)
    bs.delete_at(index)
end