n, m = gets.split.map(&:to_i)
ab = n.times.map{ |ab| gets.split.map(&:to_i) }.sort
mny = 0
while m>0 do
   if (fs=ab.shift)[1] <= m
       m -= fs[1]
       mny += fs[0]*fs[1]
   else
       mny += fs[0]*m
       m = 0
   end
end
puts mny