import Control.Monad (replicateM)
import Data.List (sort)
import qualified Data.Set as S

main :: IO ()
main = do
  (n, m) <- readPair
  s <- S.fromList <$> replicateM n readPair
  print $ solve m s

readPair :: IO (Int, Int)
readPair = do
  [x, y] <- map read . words <$> getLine
  return (x, y)

solve :: Int -> S.Set (Int, Int) -> Int
solve m s
  | m > b     = a_min * b + solve (m - b) s_rem
  | otherwise = a_min * m
  where
    ((a_min, b), s_rem) = S.deleteFindMin s