/**
 * A carpenter needs to calculate the number of cuts required to divide a given length of lumber into equal parts.
 *
 * @param lumber The length of the lumber in inches.
 * @param cuts The number of equal parts the carpenter wants to divide the lumber into.
 * @return The total number of cuts required.
 *
 * Example:
 * calculateCuts(96, 4)
 * The carpenter needs 3 cuts to divide a 96-inch lumber into 4 equal parts.
 */
fun calculateCuts(lumber: Int, cuts: Int): Int {

    var totalCuts = 0
    var remainingLumber = lumber

    while (remainingLumber > 0) {
        remainingLumber = if (remainingLumber % cuts == 0) remainingLumber else (remainingLumber / cuts) * cuts
        totalCuts++
        remainingLumber -= cuts
    }

    return totalCuts
}
/**
 * A carpenter needs to calculate the number of cuts required to divide a given length of lumber into equal parts.
 *
 * @param lumber The length of the lumber in inches.
 * @param cuts The number of equal parts the carpenter wants to divide the lumber into.
 * @return The total number of cuts required.
 *
 * Example:
 * calculateCuts(96, 4)
 * The carpenter needs 3 cuts to divide a 96-inch lumber into 4 equal parts.
 */
fun calculateCuts(lumber: Int, cuts: Int): Int {
/**
 * A carpenter needs to calculate the number of cuts required to divide a given length of lumber into equal parts.
 *
 * @param lumber The length of the lumber in inches.
 * @param cuts The number of equal parts the carpenter wants to divide the lumber into.
 * @return The total number of cuts required.
 *
 * Example:
 * calculateCuts(96, 4)
 * The carpenter needs 3 cuts to divide a 96-inch lumber into 4 equal parts.
 */
fun calculateCuts(lumber: Int, cuts: Int): Int {

    var totalCuts = 0
    var remainingLumber = lumber

    while (remainingLumber > 0) {
        remainingLumber = if (remainingLumber % cuts == 0) remainingLumber else (remainingLumber / cuts) * cuts
        totalCuts++
        remainingLumber -= cuts
    }

    return totalCuts
}