import qualified Data.ByteString.Char8 as B
import Data.Maybe

div1 a b = let (d,m) = divMod a b in d + signum m

binSearch op xmin xmax p
 | succ xmin == xmax = if p xmin == EQ then xmin else xmax
 | otherwise = case p h of
  EQ -> binSearch op xmin h p 
  LT -> binSearch op h xmax p
  GT -> binSearch op xmin h p 
 where h = op xmin xmax

main = do
 [_,a,b] <- map read . words <$> getLine
 hs <- map (fst . fromJust . B.readInt) . B.words <$> B.getContents
 print (wideSpread a b hs)

wideSpread a b hs = binSearch med xmin xmax (explode a b hs)
 where
  med x y = x + div (y-x) 2
  xmin = 0
  xmax = sum . map (`div1` a) $ hs

explode a b hs x = compare x nmag
 where
  dadd = a - b
  mrest = map (max 0 . subtract (x*b)) hs
  nmag = sum . map (`div1` dadd) $ mrest