inputs = STDIN.readlines.map{|line|line.strip.split()}
input = inputs.shift
n = input[0].to_i
m = input[1].to_i

counts = []
n.times do |ni|
    input = inputs.shift
    a = input[0].to_i
    b = input[1].to_i
    counts.push({
        :p => a,
        :c => b,
    })
end
counts.sort! do |a, b|
    a[:p] <=> b[:p]
end
sum = 0
c = 0
while m > 0
    count = counts.shift
    sum += [count[:c], m].min * count[:p]
    m -= count[:c]
end

puts(sum)