n, m = gets.split.map(&:to_i)             
ab = {}                                   
n.times do                                
  a, b = gets.split.map(&:to_i)           
  ab[a] = b                               
end                                       
price = ab.sort {|a, b| a[0] <=> b[0] }   
                                          
ans = 0                                   
while m > 0 do                            
  c = [m, price[0][1]].min                
  ans += price[0][0] * c                  
  price.delete_at(0)                      
  m -= c                                  
end                                       
                                          
puts ans                                  
                                          
