require 'pp'

attrs = Array.new
while line = $stdin.gets
    attrs << line.chomp.split.map{|v| v.to_i }
end

N_SHOPS = attrs[0][0]
NEEDS = attrs[0][1]
attrs.shift
shops = attrs.sort

cost = 0
having = 0

pp shops

while true do
  if shops[0][1] < (NEEDS - having) then
    cost   += shops[0][0] * shops[0][1]
    having += shops[0][1]
    shops.shift
  else
    cost   += shops[0][0] * (NEEDS - having)
    break
  end
end

print cost
