(*
 * forall l r (p : forall n, l < n <= r -> bool),
 *   ( exists m,
 *     l < m <= r /\ forall n H, p n H = true <-> m <= n ) ->
 *   { m |
 *     l < m <= r /\ forall n H, p n H = true <-> m <= n }
 *)
let rec lower_bound l r p =
  if r <= 1 + l
  then r
  else let m = (l + r) / 2 in
       if p m
       then lower_bound l m p
       else lower_bound m r p

let () = Scanf.scanf "%d %d %d\n" @@ fun n a b ->
  let hs = Array.init n @@ fun _ -> Scanf.scanf "%d\n" @@ fun h -> h in
  Printf.printf "%d\n" @@
    lower_bound 0 (Array.fold_left ( + ) 0 hs) @@ fun x ->
      ( >= ) x @@ Array.fold_left ( + ) 0 @@
      Array.map (fun h -> max 0 ((h - b * x + a - b - 1) / (a - b))) hs