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)
    if m - sum >= bs[index] then
        sum = sum + bs[index]
        ans = ans + as[index]*bs[index]
    else
        ans = ans + as[index]*(m-sum)
        break
    end
    as.delete_at(index)
    bs.delete_at(index)
end

p ans