{-# LANGUAGE BangPatterns #-}

import Control.Monad
import Data.List
import Data.Bits
import Debug.Trace
import Data.Maybe
import qualified Data.ByteString.Char8 as C

main :: IO ()
main = do
  [n, m] <- readIntegers
  inputs <- readNIntegers (fromIntegral n)
  print $ solve n m inputs

solve n m inputs = solveSub 0 m sorted
  where
    solveSub money _ [] = money
    solveSub money remain !(x:xs) =
      if b > remain
        then money + a * remain
        else solveSub (money + a * b) (remain - b) xs
      where
        a = x !! 0
        b = x !! 1
    sorted = sortOn (!! 0) inputs

-- 以下ライブラリ

readInts :: IO [Int]
readInts = map (fst . fromJust . C.readInt) . C.words <$> C.getLine

readNInts :: Int -> IO [[Int]]
readNInts = flip replicateM readInts

readIntegers :: IO [Integer]
readIntegers = map (fst . fromJust . C.readInteger) . C.words <$> C.getLine

readNIntegers :: Int -> IO [[Integer]]
readNIntegers = flip replicateM readIntegers

getNLns :: Int -> IO [String]
getNLns = flip replicateM getLine