enough::Int -> Int -> [Int] -> Int -> Bool
enough a b xs n= let strong = ((filter (\x->x>0)).(map (\x -> x-(b*n)))) xs in
                 let need = (sum.(map (\x-> (div x (a-b))+if (mod x (a-b))> 0 then 1 else 0))) strong in
                  need<=n
--a以上　b　未満で探索、bがありえない事が保証され、aが成り立つ事が保証されるとする。
binary_Int_dec::(Int,Int)->(Int -> Bool)->Maybe Int
binary_Int_dec (a,b) f = if a+1 == b then if f a then Just a else Nothing
                                 else let mid = div (a+b) 2 in
                                      if  f mid then binary_Int_dec (mid,b) f
                                                else binary_Int_dec (a,mid) f


--aより大、b以下で探索、bがありえる事が保証され、aがありえない事が保証されるとする。
binary_Int_inc::(Int,Int)->(Int -> Bool)->Maybe Int
binary_Int_inc (a,b) f = if a+1 == b then if f b then Just b else Nothing
                                 else let mid = div (a+b) 2 in
                                      if  f mid then binary_Int_inc (a,mid) f
                                                else binary_Int_inc (mid,b) f

solver::Int -> Int -> [Int] -> Maybe Int
solver a b xs = binary_Int_inc (1,(div (maximum xs) b)) (enough a b xs)

n_get::Int -> IO [Int]
n_get 0 =return []
n_get n = do
  dc<-getLine
  rest<-n_get (n-1)
  return ((read dc):rest)

main::IO()
main=do
  d<-getLine
  let n:a:b:[]=map read (words d)
  dat<-n_get n
  case solver a b dat of
    Just x -> print x
