N, M = gets.split.map(&:to_i)
AB = N.times.map{gets.split.map(&:to_i)}

bottle = M
tot = 0
AB.sort_by!{|x| x[0]}.each do |a, b|
  if bottle >= b
    tot += a * b
    bottle -= b   
  else  
    tot += a * bottle 
    break
  end
end

puts tot