There are numBottles water bottles that are initially full of water.
You can exchange numExchange empty water bottles from the market with one full water bottle.
The operation of drinking a full water bottle turns it into an empty bottle.
Given the two integers numBottles and numExchange, return the maximum number of water bottles you can drink.
We simulate the process step by step:
This works because each exchange is independent and only depends on the count of empty bottles at each step.
Example Input: numBottles = 9, numExchange = 3
Step-by-step execution:
Final Answer = 13
class Solution {
    public int numWaterBottles(int numBottles, int numExchange) {
        int count = 0;
        int empty = 0;
        while (numBottles > 0) {
            count += numBottles;
            empty += numBottles;
            numBottles = empty / numExchange;
            empty = empty % numExchange;
        }
        return count;
    }
}