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

x = []
for i in 1..n do
    ab = gets.split().map(&:to_i)
    x << ab
end

x = x.sort_by{|e| e.first}

sum = 0
ans = 0
x.each do |xi|
    sum += xi[1]
    ans += xi[0]*xi[1]
    if sum >= m then
        ans -= xi[0]*(sum-m)
        break
    end
end

p ans