def csort (a, b)
    a.size.times do |i|  
        (a.size - (i + 1)).times do |j|
            if a[j] >  a[j + 1] then
                a[j], a[j + 1] = a[j + 1], a[j]
                b[j], b[j + 1] = b[j + 1], b[j]
            end
            j -= 1
        end
        i += 1
    end
    return a, b
end
n, m = gets.chomp.split.map(&:to_i)
ans = 0
x = []
y = []

n.times do |hoge|
    x[hoge], y[hoge] = gets.chomp.split.map(&:to_i)
end
x, y = csort(x, y)
n.times do |hoge|
    if m < y[hoge]
        ans += x[hoge] * m
        break
    else
        ans += x[hoge] * y[hoge]
        m -= y[hoge]
    end
end
puts ans

