{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -O2 #-}

import qualified Data.Vector.Unboxed as VU
import Data.Bits
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as BSL
import Data.List


-- 1 <= damageOther < damageTarget <= 10^9
isPossibleWith :: VU.Vector Int -> Int -> Int -> Int -> Bool
isPossibleWith !hps !damageTarget !damageOther !numMagics
  = (<= numMagics) $ VU.sum
    $ VU.map ((`div` damageDiff) . (+ (damageDiff - 1)))
    $ VU.filter (> 0)
    $ VU.map (subtract damageMin)
    $ hps
  where
    !damageMin = damageOther * numMagics
    !damageDiff = damageTarget - damageOther

query :: VU.Vector Int -> Int -> Int -> Int
query !hps !damageTarget !damageOther = binSearch 0 (10 ^ 9)
  where
    binSearch !ng !ok
      | ok - ng <= 1 = ok
      | isPossibleWith hps damageTarget damageOther mid = binSearch ng mid
      | otherwise = binSearch mid ok
      where
        !mid = (ng + ok) `shiftR` 1

main :: IO ()
main = do
  [n, damageTarget, damageOther]
    <- unfoldr (BS.readInt . BS.dropWhile (==' ')) <$> BS.getLine
  hps <- VU.unfoldrN n (BSL.readInt . BSL.dropWhile (< '-'))
         <$> BSL.getContents
  print $ query hps damageTarget damageOther
