Scanf.scanf "%d %d %d" (fun n a b ->
    let h = Array.init n (fun _ -> Scanf.scanf " %d" (fun h -> h)) in
    Array.sort compare h;

    let check m =
        let c = a - b in
        let s = Array.fold_left (fun acc v ->
            acc + (max 0 (v - m * b) + c - 1) / c) 0 h
        in
        s <= m
    in

    let rec bin left right =
        if left = right then left else
            let m = (left + right) / 2 in
            if check m then bin left m
                       else bin (m + 1) right
    in
    bin 0 ((h.(n - 1) + b - 1) / b + 1) |> Printf.printf "%d\n"
)