N, M = gets.split.map(&:to_i)

list = Array.new( N ).map{ gets.split.map(&:to_i)  }

list.sort!

ans = 0

m = M

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

p ans