n, m = gets.split.map(&:to_i)
list = Array.new( n ){ gets.split.map(&:to_i) }.sort

ans = 0
list.each do |l|
  
  l[1] = m if l[1] > m  
  
  ans += l[0] * l[1]
  
  m -= l[1] 
  
  break if m <= 0
  
end

puts ans