import Control.Monad
import Control.Applicative
import Data.List
import Data.Ord


getBysplit = map read . words <$> getLine

getPair = do
  [a, b] <- map read . words <$> getLine
  return (a, b)

main :: IO()
main = do
  [n, m] <- getBysplit :: IO [Int]
  pairlst <- replicateM n getPair :: IO [(Int, Int)]
  let lst = sortOn fst pairlst
  print $ solve m 0 lst


solve ::Int -> Int -> [(Int, Int)] -> Int
solve _ _ [] = undefined
solve m acc ((a, b):xs)
            | m - b <= 0 = acc + a*m
            | m - b > 0  = solve (m - b) (acc + a*b) xs
