{-# LANGUAGE BangPatterns #-}

import Control.Monad
import Data.Char
import qualified Data.ByteString.Char8 as C
import Data.List
import qualified Data.Vector.Unboxed as U

main = sol <$> (get <$> C.getLine) <*> (get <$> C.getContents) >>= print

sub [n,a,b] = sol [n,a,b] <$> replicateM n readLn

get = unfoldr (C.readInt . C.dropWhile isSpace) 

sol [n,a,b] hs = bs 0 hi p
  where
  v = U.fromListN n hs
  hi = U.foldr' ((+) . (`dc` a)) 0 v
  p x = (x>=) $ U.foldr' ((+) . flip dc (a-b) . max 0 . subtract (x*b)) 0 v
  bs !l !r p
    | l+1>=r    = r
    | p m       = bs l m p
    | otherwise = bs m r p
    where !m = (l+r) `div` 2

dc p q = (p+q-1) `div` q