import Control.Monad
import Data.List
main = do
  [n,m] <- map read . words <$> getLine
  abs <- replicateM n (map read . words <$> getLine)
  let sortedABs = sortOn fst $ map (\[a,b] -> (a,b)) abs
  print $ f 0 m sortedABs
  
f acc m ((a,b):xs)
  | m <= b = acc + m * a
  | m > b  = f (acc + b * a) (m-b) xs