import qualified Data.Vector.Unboxed as VU
import qualified Data.ByteString.Char8 as B
import Control.Monad
import Data.List
import Data.Char

toTuple bs =
    let
        Just (a, bs') = B.readInt bs
        Just (b, _) = B.readInt $ B.dropWhile isSpace bs'
    in
        (a, b)

solve [] _ = 0
solve ((a,b):xs) m
    | m <= 0 = 0
    | otherwise = ((min b m) * a) + solve xs (m-b)

main = do
    [n,m] <- map read . words <$> getLine
    ds <- sort <$> replicateM n (toTuple <$> B.getLine)
    print $ solve ds m