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

binSearch op xmin xmax p
 | succ xmin == xmax = xmax
 | p h = binSearch op xmin h p
 | otherwise = binSearch op h xmax p
 where h = op xmin xmax

main = do
 [_,a,b] <- map read . words <$> getLine
 hs <- map read . words <$> 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 = maxBound :: Int

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