import Control.Monad
import Control.Applicative
import Data.List
import Data.Maybe
import Data.Ratio
import Data.Int
import qualified Data.ByteString.Char8 as BS

listToTuple3 [a,b,c] = (a,b,c)
readIntBS = fst . fromJust . BS.readInt

main :: IO ()
main = do
  (n,a,b) <- listToTuple3 . map read . words <$> getLine :: IO (Int64,Int64,Int64)
  hs <- reverse . sort . map (fromIntegral . readIntBS) . BS.lines <$> BS.getContents :: IO [Int64]

  print $ solve hs a b 0 (ceiling $ (maximum hs) % b)
  
  where
    solve hs a b l r = if l+1>=r then r
      else if aux mid hs a b then solve hs a b l mid
      else solve hs a b mid r
      where
        mid = (l+r)`div`2

    aux x hs a b = (sum $ map (\y -> ceil y (a-b)) $ takeWhile (>=0) $ map (\h -> h-x*b) hs) <= x
    ceil a b = a `div` b + (if a `mod` b == 0 then 0 else 1)
