N,k = gets.split.map(&:to_i)
h={}
N.times do |i|
    a,b = gets.split.map(&:to_i)
    if h.has_key?(a)
        h[a]+=b
    else
        h[a]=b
    end
end
res = 0
h.sort.each do |price,num|
    if num <= k
        res += price * num
        k-=num
    else
        res += price * k
        k=0
    end
    break if k==0
end
puts res