ary = Array.new
while line = $stdin.gets
  ary << line.chomp.split
end
n = ary[0][0].to_i
m = ary[0][1].to_i
ary.delete_at(0)
ary.map!{|item| item.map(&:to_i) }
ary.sort!{|a, b| a[0] <=> b[0] }
b = 0
y = 0
k = 0
while b != m do
    iru = m-b
    if ary[k][1] == 0 then
        k = k + 1
    elsif ary[k][1] >= iru then
        y = y + ary[k][0]*iru
        b = b + iru
    else
        y = y + ary[k][0]*ary[k][1]
        b = b + ary[k][1]
        k = k + 1
    end
end
print y