Alice has a bundle of sticks. She wants to select some sticks and split them into \(k\) rows.
For beauty, the difference between the lengths of all sticks in the same row shall not exceed 1 and each row has the same number of sticks. The length of each stick is a positive integer from 1 to \(n\).
For every possible length, you know the amount of stick with that length.
Please calculate the maximum number of sticks Alice can select.