import Data.List
import Control.Monad

main = do
  [n,m] <- map read.words <$> getLine
  abs <- replicateM n $ (\[a,b]->(a,b)).map read.words <$> getLine
  let abs' = sortBy (\(a,_) (b,_) -> compare a b) abs
  print $ solve m abs'

solve m ((a,b):abs)
  | m <= b = a*m
  | otherwise = a*b + solve (m-b) abs